shithub: dav1d

Download patch

ref: 52c7427e3fddd6f9cc44e2eb0b1ccf561946de8e
parent: c99c27ea3a41320564010891dafee9a4d6053e76
author: Martin Storsjö <martin@martin.st>
date: Fri Nov 22 03:32:36 EST 2019

annexb: Cast size_t to int before adding to an int

This fixes these warnings with MSVC:
warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data

--- a/tools/input/annexb.c
+++ b/tools/input/annexb.c
@@ -78,7 +78,7 @@
                            &obu_size, &type, 1);
     if (ret < 0 || type != DAV1D_OBU_TD || obu_size > 0)
         return 0;
-    cnt += obu_unit_size;
+    cnt += (int)obu_unit_size;
 
     // look for first frame and accompanying sequence header
     int seq = 0;
@@ -94,7 +94,7 @@
                                &obu_size, &type, 1);
         if (ret < 0)
             return 0;
-        cnt += obu_unit_size;
+        cnt += (int)obu_unit_size;
 
         switch (type) {
         case DAV1D_OBU_SEQ_HDR: