diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-02-13 11:11:16 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-04 20:12:12 +0300 |
commit | 96101fd4d7423d06fd765fa4bc1d93b23b3db334 (patch) | |
tree | 3abb9030855153de853fdbecf97e9f3102089c26 | |
parent | 04bfc61e2782c4c1f53f090cf6190cd5016a9dac (diff) |
matroskadec_haali: support demuxing QDM2/SVQ3 as written by mkvtoolnix
-rw-r--r-- | libavformat/matroskadec_haali.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavformat/matroskadec_haali.c b/libavformat/matroskadec_haali.c index 821a53fbff..b70168dce9 100644 --- a/libavformat/matroskadec_haali.c +++ b/libavformat/matroskadec_haali.c @@ -1093,9 +1093,20 @@ static int mkv_read_header(AVFormatContext *s) if (ret < 0) return ret; codec_id = st->codec->codec_id; + } else if (!strcmp(info->CodecID, "A_QUICKTIME") && (info->CodecPrivateSize >= 86) && (info->CodecPrivate != NULL)) { + fourcc = AV_RL32((uint8_t *)info->CodecPrivate + 4); + codec_id = ff_codec_get_id(ff_codec_movaudio_tags, fourcc); + if (ff_codec_get_id(ff_codec_movaudio_tags, AV_RL32((uint8_t *)info->CodecPrivate))) { + fourcc = AV_RL32((uint8_t *)info->CodecPrivate); + codec_id = ff_codec_get_id(ff_codec_movaudio_tags, fourcc); + } } else if (!strcmp(info->CodecID, "V_QUICKTIME") && (info->CodecPrivateSize >= 86) && (info->CodecPrivate != NULL)) { - fourcc = AV_RL32(info->CodecPrivate); + fourcc = AV_RL32((uint8_t *)info->CodecPrivate + 4); codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc); + if (ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32((uint8_t *)info->CodecPrivate))) { + fourcc = AV_RL32((uint8_t *)info->CodecPrivate); + codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc); + } } else if (codec_id == AV_CODEC_ID_PCM_S16BE) { switch (info->AV.Audio.BitDepth) { case 8: codec_id = AV_CODEC_ID_PCM_U8; break; |