[FFmpeg-cvslog] avconv: fix counting encoded video size.
Anton Khirnov
git at videolan.org
Wed Mar 7 03:37:18 CET 2012
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Mar 6 08:57:58 2012 +0100| [39da3b223fe52ec5b51e4af7d123b47b890efd8f] | committer: Anton Khirnov
avconv: fix counting encoded video size.
avcodec_encode_video2() return value is 0 on success, encoded frame size
is stored in the packet.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39da3b223fe52ec5b51e4af7d123b47b890efd8f
---
avconv.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/avconv.c b/avconv.c
index 8526961..f9ad054 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) {
More information about the ffmpeg-cvslog
mailing list