[FFmpeg-cvslog] r26301 - trunk/libavformat/electronicarts.c
pross
subversion
Mon Jan 10 13:51:45 CET 2011
Author: pross
Date: Mon Jan 10 13:51:45 2011
New Revision: 26301
Log:
electronicarts: only apply audio sanity checks when audio stream is present
Modified:
trunk/libavformat/electronicarts.c
Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c Mon Jan 10 13:23:03 2011 (r26300)
+++ trunk/libavformat/electronicarts.c Mon Jan 10 13:51:45 2011 (r26301)
@@ -422,17 +422,18 @@ 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->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) {
+ if (ea->num_channels <= 0) {
+ av_log(s, AV_LOG_WARNING, "Unsupported number of channels: %d\n", ea->num_channels);
+ ea->audio_codec = 0;
+ return 1;
+ }
+ if (ea->sample_rate <= 0) {
+ av_log(s, AV_LOG_ERROR, "Unsupported sample rate: %d\n", ea->sample_rate);
+ ea->audio_codec = 0;
+ return 1;
+ }
+
/* initialize the audio decoder stream */
st = av_new_stream(s, 0);
if (!st)
More information about the ffmpeg-cvslog
mailing list