# HG changeset patch # User aurel # Date 1232298792 0 # Node ID 6e4ce186db2e8b7ddbfe22a53e044a3eae34cdb1 # Parent 54271b8b5e008c8bb8766bdc528f58409f9548ef matroskadec: parse the WAVEFORMATEX header and discard it from extradata diff -r 54271b8b5e00 -r 6e4ce186db2e matroskadec.c --- a/matroskadec.c Sun Jan 18 01:48:14 2009 +0000 +++ b/matroskadec.c Sun Jan 18 17:13:12 2009 +0000 @@ -1201,8 +1201,13 @@ } else if (!strcmp(track->codec_id, "A_MS/ACM") && track->codec_priv.size >= 18 && track->codec_priv.data != NULL) { - uint16_t tag = AV_RL16(track->codec_priv.data); - codec_id = codec_get_id(codec_wav_tags, tag); + ByteIOContext b; + init_put_byte(&b, track->codec_priv.data, track->codec_priv.size, + URL_RDONLY, NULL, NULL, NULL, NULL); + get_wav_header(&b, st->codec, track->codec_priv.size); + codec_id = st->codec->codec_id; + extradata_offset = 18; + track->codec_priv.size -= extradata_offset; } else if (!strcmp(track->codec_id, "V_QUICKTIME") && (track->codec_priv.size >= 86) && (track->codec_priv.data != NULL)) {