]> git.sesse.net Git - x264/commitdiff
Workaround bug in fps/timestamp handling with lavf input
authorYasuhiro Ikeda <wipple625@gmail.com>
Tue, 3 Aug 2010 13:07:36 +0000 (22:07 +0900)
committerFiona Glaser <fiona@x264.com>
Mon, 16 Aug 2010 09:49:38 +0000 (02:49 -0700)
reordered_opaque in lavf doesn't work correctly in the identity case (no reordering).
Fixes incorrect output for some file types (e.g. raw in mov).

input/lavf.c

index e1dd3525110f0f2d680a556accc2d2b30dd7c721..55112bf906c86169a5973730590ab458a549fdb0 100644 (file)
@@ -96,7 +96,7 @@ static int read_frame_internal( cli_pic_t *p_pic, lavf_hnd_t *h, int i_frame, vi
     if( h->vfr_input )
     {
         p_pic->pts = p_pic->duration = 0;
-        if( frame.reordered_opaque != AV_NOPTS_VALUE )
+        if( c->has_b_frames && frame.reordered_opaque != AV_NOPTS_VALUE )
             p_pic->pts = frame.reordered_opaque;
         else if( pkt->dts != AV_NOPTS_VALUE )
             p_pic->pts = pkt->dts; // for AVI files