diff options
author | Daniel Kang <daniel.d.kang@gmail.com> | 2011-01-06 03:30:19 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2011-01-06 03:30:19 +0000 |
commit | 6cbce6365067e1bdd5127d9001809726ea538e09 (patch) | |
tree | d3e0b230ffa11c9d5a914206922d7333ac53aafd | |
parent | 6bbdba08c277fd63cb9349876e7377a2b53f5b89 (diff) | |
download | ffmpeg-6cbce6365067e1bdd5127d9001809726ea538e09.tar.gz |
Fix assertion fail on audio files with invalid sample rates,
fixes issue 2475.
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26240 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index fb93e3b57c..32067e9a79 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -812,7 +812,7 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, break; case AVMEDIA_TYPE_AUDIO: frame_size = get_audio_frame_size(st->codec, pkt->size); - if (frame_size < 0) + if (frame_size <= 0 || st->codec->sample_rate <= 0) break; *pnum = frame_size; *pden = st->codec->sample_rate; |