diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:53:37 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:53:37 +0000 |
commit | 93fa8b2bf5eb4302b2b188e7cbc44bf4909fd510 (patch) | |
tree | 10c4367483f653b3fff0d2566a2ecfbbb72247e1 /libavformat/electronicarts.c | |
parent | e5d34ab6d0e4d931f25d6c30dd9d648ea261addc (diff) | |
download | ffmpeg-93fa8b2bf5eb4302b2b188e7cbc44bf4909fd510.tar.gz |
check compression_type to assign audio codec
Originally committed as revision 10797 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 3465f1cd72..e2100547fc 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -82,7 +82,7 @@ static int process_audio_header_elements(AVFormatContext *s) 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(AVFormatContext *s) } } - 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; } |