[FFmpeg-cvslog] r26298 - trunk/libavformat/electronicarts.c
pross
subversion
Mon Jan 10 12:38:38 CET 2011
Author: pross
Date: Mon Jan 10 12:38:38 2011
New Revision: 26298
Log:
perform sanity check on sample rate in electronicarts demuxer
Fixes issue2525
Original patch by Daniel Kang, daniel.d.kang at gmail
Modified:
trunk/libavformat/electronicarts.c
Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c Mon Jan 10 12:36:11 2011 (r26297)
+++ trunk/libavformat/electronicarts.c Mon Jan 10 12:38:38 2011 (r26298)
@@ -427,6 +427,11 @@ static int ea_read_header(AVFormatContex
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);
More information about the ffmpeg-cvslog
mailing list