summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-10 20:23:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-10 20:31:06 +0100
commit3868e97c6b68e0b69745e18eacb69a3d3640ac7f (patch)
tree461417d9bddd95cd27470912c33fe3224a48605e /ffmpeg.c
parent8560fdc45195e310c52e3ce431f8ce3082078936 (diff)
ffmpeg: fix vstats
Broken by: 394fb56c29eee7f4f8f0334d8b5d30d3c54ac703 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index caed594638..6a51810f3c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1396,6 +1396,7 @@ static void flush_encoders(void)
if (encode) {
AVPacket pkt;
+ int pkt_size;
int got_packet;
av_init_packet(&pkt);
pkt.data = NULL;
@@ -1426,9 +1427,10 @@ static void flush_encoders(void)
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);
+ pkt_size = pkt.size;
write_frame(os, &pkt, ost);
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) {
- do_video_stats(ost, pkt.size);
+ do_video_stats(ost, pkt_size);
}
}