Commit ae6a5e60 authored by aurel's avatar aurel

check compression_type to assign audio codec

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10797 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36399c90
...@@ -82,7 +82,7 @@ static int process_audio_header_elements(AVFormatContext *s) ...@@ -82,7 +82,7 @@ static int process_audio_header_elements(AVFormatContext *s)
int inHeader = 1; int inHeader = 1;
EaDemuxContext *ea = s->priv_data; EaDemuxContext *ea = s->priv_data;
ByteIOContext *pb = &s->pb; ByteIOContext *pb = &s->pb;
int compression_type; int compression_type = -1;
ea->num_channels = 1; ea->num_channels = 1;
...@@ -138,7 +138,12 @@ static int process_audio_header_elements(AVFormatContext *s) ...@@ -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; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment