[FFmpeg-devel] [PATCH] Fix the packet duration when flushing the encoder.
Thierry Foucu
tfoucu at gmail.com
Wed Nov 7 20:33:41 CET 2012
---
ffmpeg.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index f8cf6b7..3554d9e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1289,6 +1289,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);
}
--
1.7.7.3
More information about the ffmpeg-devel
mailing list