projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f0920d
)
Fix assertion failure due to frames being 0 in mp3 vbr bitrate calculation.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 29 Dec 2010 01:33:36 +0000
(
01:33
+0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 29 Dec 2010 01:33:36 +0000
(
01:33
+0000)
Fixes issue 2442.
Originally committed as revision 26121 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/mp3.c
patch
|
blob
|
history
diff --git
a/libavformat/mp3.c
b/libavformat/mp3.c
index
9c5c149
..
e70a120
100644
(file)
--- 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;