avcodec/mpeg12: Try to fetch pts/dts from both the packet associated with the picture...
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Jan 2015 11:18:40 +0000 (12:18 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Jan 2015 12:25:09 +0000 (13:25 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12.c

index 153e4aa..3128e8d 100644 (file)
@@ -234,7 +234,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
                 }
             }
             if (pc->frame_start_found == 0 && s && state == PICTURE_START_CODE) {
-                ff_fetch_timestamp(s, i - 3, 1, 0);
+                ff_fetch_timestamp(s, i - 3, 1, i > 3);
             }
         }
     }