From: Yasuhiro Ikeda Date: Tue, 3 Aug 2010 13:07:36 +0000 (+0900) Subject: Workaround bug in fps/timestamp handling with lavf input X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=13230db01dc3f8554c3aa2dd3b82faa703a0f37b;p=x264.git Workaround bug in fps/timestamp handling with lavf input 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). --- diff --git a/input/lavf.c b/input/lavf.c index e1dd3525..55112bf9 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -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