diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-18 17:13:12 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-18 17:13:12 +0000 |
commit | 68a71451f6c748ccb046e3c8a0487ca26f7ed4c3 (patch) | |
tree | c0c486737029d5d47b9fec405964f3deffd7ab24 | |
parent | 5a44906d8e2bc8e0578edb9115bec15e8181e8bf (diff) | |
download | ffmpeg-68a71451f6c748ccb046e3c8a0487ca26f7ed4c3.tar.gz |
matroskadec: parse the WAVEFORMATEX header and discard it from extradata
Originally committed as revision 16672 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskadec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e239a557e9..7f4f0c4063 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1201,8 +1201,13 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) } 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)) { |