From 3ba416408aef99b4d7d92719c0a03dc2c9647025 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 6 Nov 2012 14:24:31 -0500 Subject: [PATCH] avconv: rescale packet duration to muxer time base when flushing encoders Fixes Bug 385 --- avconv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avconv.c b/avconv.c index 964847a488..c931c46de5 100644 --- a/avconv.c +++ b/avconv.c @@ -964,6 +964,8 @@ static void flush_encoders(void) pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); if (pkt.dts != AV_NOPTS_VALUE) pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); + if (pkt.duration > 0) + pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base); write_frame(os, &pkt, ost); } -- 2.11.0