Commit 39da3b22 authored by Anton Khirnov's avatar 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.
parent 632eb1bb
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment