mirror of https://git.ffmpeg.org/ffmpeg.git
avconv: rescale packet duration to muxer time base when flushing encoders
Fixes Bug 385
This commit is contained in:
parent
00f8ad41c7
commit
3ba416408a
2
avconv.c
2
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);
|
pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base);
|
||||||
if (pkt.dts != AV_NOPTS_VALUE)
|
if (pkt.dts != AV_NOPTS_VALUE)
|
||||||
pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
|
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);
|
write_frame(os, &pkt, ost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue