[FFmpeg-cvslog] r10797 - trunk/libavformat/electronicarts.c
aurel
subversion
Fri Oct 19 00:53:38 CEST 2007
Author: aurel
Date: Fri Oct 19 00:53:37 2007
New Revision: 10797
Log:
check compression_type to assign audio codec
Modified:
trunk/libavformat/electronicarts.c
Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c (original)
+++ trunk/libavformat/electronicarts.c Fri Oct 19 00:53:37 2007
@@ -82,7 +82,7 @@ static int process_audio_header_elements
int inHeader = 1;
EaDemuxContext *ea = s->priv_data;
ByteIOContext *pb = &s->pb;
- int compression_type;
+ int compression_type = -1;
ea->num_channels = 1;
@@ -138,7 +138,12 @@ static int process_audio_header_elements
}
}
- ea->audio_codec = CODEC_ID_ADPCM_EA;
+ switch (compression_type) {
+ case 7: ea->audio_codec = CODEC_ID_ADPCM_EA; break;
+ default:
+ av_log(s, AV_LOG_ERROR, "unsupported stream type; compression_type=%i\n", compression_type);
+ return 0;
+ }
return 1;
}
More information about the ffmpeg-cvslog
mailing list