avconv: rescale packet duration to muxer time base when flushing encoders

Fixes Bug 385
This commit is contained in:
Justin Ruggles 2012-11-06 14:24:31 -05:00
parent 00f8ad41c7
commit 3ba416408a
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}