Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-15 20:19:54 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-01-18 02:47:39 +0400
commitd73f8976691f72296d70b7a57b68a690a7ade662 (patch)
treef4e708ae5f639e92180afda10d4749125f5fa307 /ffmpeg.c
parent5c459504f697ef59a3f218efa4dc2bfc31d307da (diff)
ffmpeg: update statistics only when a packet is actually muxed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6b90878795..df56c01758 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)