summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-06 08:57:58 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-06 10:06:21 +0100
commit39da3b223fe52ec5b51e4af7d123b47b890efd8f (patch)
treefba49df16b300fa70894803ca97fdb0d7b7b97ad /avconv.c
parent632eb1bbae473f7105e0ec6556cb040ea6d30910 (diff)
avconv: fix counting encoded video size.
avcodec_encode_video2() return value is 0 on success, encoded frame size is stored in the packet.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c4
1 files 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) {