--- libavformat/nuv.c | 16 +++++++++++++--- libavformat/riff.c | 5 ----- 2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 2cbf348..0662930 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -26,6 +26,12 @@ #include "internal.h" #include "riff.h" +static const AVCodecTag nuv_audio_tags[] = { + { AV_CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') }, + { AV_CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') }, + { AV_CODEC_ID_NONE, 0 }, +}; + typedef struct { int v_id; int a_id; @@ -101,9 +107,13 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, ast->codec->bits_per_coded_sample = avio_rl32(pb); ast->codec->channels = avio_rl32(pb); ast->codec->channel_layout = 0; - ast->codec->codec_id = - ff_wav_codec_get_id(ast->codec->codec_tag, - ast->codec->bits_per_coded_sample); + + ast->codec->codec_id = ff_codec_get_id(nuv_audio_tags, + ast->codec->codec_tag); + if (ast->codec->codec_id == AV_CODEC_ID_NONE) + ast->codec->codec_id = ff_wav_codec_get_id(ast->codec->codec_tag, + ast->codec->bits_per_coded_sample); + ast->need_parsing = AVSTREAM_PARSE_FULL; } else avio_skip(pb, 4 * 4); diff --git a/libavformat/riff.c b/libavformat/riff.c index fde1131..557605e 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -343,11 +343,6 @@ const AVCodecTag ff_codec_wav_tags[] = { { AV_CODEC_ID_FLAC, 0xF1AC }, { AV_CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' }, { AV_CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id? - - /* FIXME: All of the IDs below are not 16 bit and thus illegal. */ - // for NuppelVideo (nuv.c) - { AV_CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') }, - { AV_CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') }, { AV_CODEC_ID_NONE, 0 }, }; -- 1.7.1 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel