Browse Source

avconv: fix counting encoded video size.

avcodec_encode_video2() return value is 0 on success, encoded frame size
is stored in the packet.
tags/n0.11
Anton Khirnov 13 years ago
parent
commit
39da3b223f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      avconv.c

+ 2
- 2
avconv.c View File

@@ -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) {


Loading…
Cancel
Save