aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-20 16:05:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-20 16:05:47 +0000
commitc7baf14bd4f56eed6d1a9936fe38932d884eef2f (patch)
treef3d7efc5f3c1a3ccd18e245aed71ce9d042e1d28
parent84ad613008a38c5d8b9c32d9e5b2d95ca017ca80 (diff)
downloadffmpeg-c7baf14bd4f56eed6d1a9936fe38932d884eef2f.tar.gz
muxing overhead statistic fix for stream copying
Originally committed as revision 3143 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 5d211a2ea0..f079f6060b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1167,6 +1167,11 @@ static int output_packet(AVInputStream *ist, int ist_index,
avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
ost->st->pts.val= av_rescale(ist->pts, os->pts_den, os->pts_num*AV_TIME_BASE);
+ if(ost->st->codec.codec_type == CODEC_TYPE_AUDIO)
+ audio_size += data_size;
+ else if (ost->st->codec.codec_type == CODEC_TYPE_VIDEO)
+ video_size += data_size;
+
av_write_frame(os, ost->index, data_buf, data_size);
ost->st->codec.frame_number++;
ost->frame_number++;