[FFmpeg-cvslog] ffmpeg: update statistics only when a packet is actually muxed
Michael Niedermayer
git at videolan.org
Sat Jan 18 00:06:47 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 15 17:19:54 2014 +0100| [d73f8976691f72296d70b7a57b68a690a7ade662] | committer: Michael Niedermayer
ffmpeg: update statistics only when a packet is actually muxed
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d73f8976691f72296d70b7a57b68a690a7ade662
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 6b90878..df56c01 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1381,7 +1381,6 @@ static void flush_encoders(void)
av_log(NULL, AV_LOG_FATAL, "%s encoding failed\n", desc);
exit_program(1);
}
- *size += pkt.size;
if (ost->logfile && enc->stats_out) {
fprintf(ost->logfile, "%s", enc->stats_out);
}
@@ -1393,6 +1392,7 @@ static void flush_encoders(void)
av_free_packet(&pkt);
continue;
}
+ *size += pkt.size;
if (pkt.pts != AV_NOPTS_VALUE)
pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base);
if (pkt.dts != AV_NOPTS_VALUE)
More information about the ffmpeg-cvslog
mailing list