diff options
author | Daniel Kang <daniel.d.kang@gmail.com> | 2011-01-10 11:38:38 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2011-01-10 11:38:38 +0000 |
commit | cb77dad72414940837bdb01dad5e747175d6a01f (patch) | |
tree | 39894e6103a16fcefab774e908751558d6cbbdd5 | |
parent | c19a216af3ffc965752e600ac5fc298807d92857 (diff) | |
download | ffmpeg-cb77dad72414940837bdb01dad5e747175d6a01f.tar.gz |
perform sanity check on sample rate in electronicarts demuxer
Fixes issue2525
Original patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26298 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/electronicarts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 249e5c8175..c39da1a8a0 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -427,6 +427,11 @@ static int ea_read_header(AVFormatContext *s, ea->audio_codec = 0; } + if (ea->sample_rate <= 0) { + av_log(s, AV_LOG_ERROR, "Unsupported sample rate: %d\n", ea->sample_rate); + ea->audio_codec = 0; + } + if (ea->audio_codec) { /* initialize the audio decoder stream */ st = av_new_stream(s, 0); |