]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpeg12.c
interpret H264 VUI timing info correctly
[ffmpeg] / libavcodec / mpeg12.c
index 514ff29318c138a9a520e1f5796398be0fcfed1f..c582ad7a0dc731f37fa232bc4c077c3032bf6585 100644 (file)
@@ -2178,7 +2178,7 @@ static int find_start_code(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
     const uint8_t *buf_ptr= *pbuf_ptr;
 
     buf_ptr++; //gurantees that -1 is within the array
-    buf_end -= 2; // gurantees that +2 is within the array
+    buf_end -= 3; // gurantees that +3 is within the array
 
     while (buf_ptr < buf_end) {
         if(*buf_ptr==0){
@@ -2192,7 +2192,7 @@ static int find_start_code(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
         }
         buf_ptr += 2;
     }
-    buf_end += 2; //undo the hack above
+    buf_end += 3; //undo the hack above
 
     *pbuf_ptr = buf_end;
     return -1;