[FFmpeg-cvslog] avformat/utils: Do not estimate the container bitrate from the streams if one video stream lacks the bitrate
Michael Niedermayer
git at videolan.org
Sat Dec 13 19:30:36 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 13 19:20:10 2014 +0100| [53496aa7f3d1b2165a198c3b96099e648963c218] | committer: Michael Niedermayer
avformat/utils: Do not estimate the container bitrate from the streams if one video stream lacks the bitrate
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53496aa7f3d1b2165a198c3b96099e648963c218
---
libavformat/utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8aee511..3636d43 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2328,6 +2328,11 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
break;
}
bit_rate += st->codec->bit_rate;
+ } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec_info_nb_frames > 1) {
+ // If we have a videostream with packets but without a bitrate
+ // than consider the sum not known
+ bit_rate = 0;
+ break;
}
}
ic->bit_rate = bit_rate;
More information about the ffmpeg-cvslog
mailing list