Browse Source

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
tags/n0.8
Daniel Kang Peter Ross 15 years ago
parent
commit
cb77dad724
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/electronicarts.c

+ 5
- 0
libavformat/electronicarts.c View File

@@ -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);


Loading…
Cancel
Save