From a82a0ce26f47460b5cb1487ab758ff04c83b859a Mon Sep 17 00:00:00 2001 From: Yasuhiro Ikeda Date: Tue, 3 Aug 2010 22:07:36 +0900 Subject: [PATCH] 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). --- input/lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5