diff --git a/libavformat/mov.c b/libavformat/mov.c index 1956a80dd60a8c112c063c3846aacfe478d541a6..f0b7d320bb8a327ecdd90fd034e3823090e58e96 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -603,6 +603,9 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) st->codec->codec_tag = format; id = codec_get_id(codec_movaudio_tags, format); + if (id<=0 && (format&0xFFFF) == 'm' + ('s'<<8)) + id = codec_get_id(codec_wav_tags, bswap_32(format)&0xFFFF); + if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) { st->codec->codec_type = CODEC_TYPE_AUDIO; } else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */