From 39da3b223fe52ec5b51e4af7d123b47b890efd8f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 6 Mar 2012 08:57:58 +0100 Subject: [PATCH] avconv: fix counting encoded video size. avcodec_encode_video2() return value is 0 on success, encoded frame size is stored in the packet. --- avconv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avconv.c b/avconv.c index 8526961f7a..f9ad054276 100644 --- a/avconv.c +++ b/avconv.c @@ -1475,8 +1475,8 @@ static void do_video_out(AVFormatContext *s, pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); write_frame(s, &pkt, ost); - *frame_size = ret; - video_size += ret; + *frame_size = pkt.size; + video_size += pkt.size; /* if two pass, output log */ if (ost->logfile && enc->stats_out) {