[FFmpeg-cvslog] r26296 - trunk/libavformat/electronicarts.c

pross subversion
Mon Jan 10 12:02:07 CET 2011


Author: pross
Date: Mon Jan 10 12:02:07 2011
New Revision: 26296

Log:
perform sanity check on number of channels in electronicarts demuxer
Fixes issue2514
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 11:47:10 2011	(r26295)
+++ trunk/libavformat/electronicarts.c	Mon Jan 10 12:02:07 2011	(r26296)
@@ -422,6 +422,11 @@ static int ea_read_header(AVFormatContex
         st->codec->height = ea->height;
     }
 
+    if (ea->num_channels <= 0) {
+        av_log(s, AV_LOG_WARNING, "Unsupported number of channels: %d\n", ea->num_channels);
+        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