diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-12-29 01:33:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-12-29 01:33:36 +0000 |
commit | 7cf0472e6a2a320af4deafdc08001ae57f837ca3 (patch) | |
tree | ad9b48c099cf3715284783451717ddbf2b96592e /libavformat/mp3.c | |
parent | 1f0920dbcaf7a388dcbb54fae93f38c41ad46fc7 (diff) | |
download | ffmpeg-7cf0472e6a2a320af4deafdc08001ae57f837ca3.tar.gz |
Fix assertion failure due to frames being 0 in mp3 vbr bitrate calculation.
Fixes issue 2442.
Originally committed as revision 26121 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mp3.c')
-rw-r--r-- | libavformat/mp3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c index 9c5c149d39..e70a120601 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -128,7 +128,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) if(frames) st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate}, st->time_base); - if(size) + if(size && frames) st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf); return 0; |