diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-29 13:58:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-29 14:00:44 +0100 |
commit | d7b20bfbb582c369518c73720fb4b0266714cde6 (patch) | |
tree | 27dfaa2c3e2f273e661555336b6ed6d6b9eb9e5e /libavformat/riff.c | |
parent | 076300bf8b43d5d56a91cd2ad845d596969c87cf (diff) | |
parent | 5c7bf2dddee5bdfa247ff0d57cb8a37d19077f66 (diff) | |
download | ffmpeg-d7b20bfbb582c369518c73720fb4b0266714cde6.tar.gz |
Merge commit '5c7bf2dddee5bdfa247ff0d57cb8a37d19077f66'
* commit '5c7bf2dddee5bdfa247ff0d57cb8a37d19077f66':
lavf: move nuv fourcc audio tags from riff to nuv
lavf: add a common function for selecting a pcm codec from parameters
Conflicts:
libavformat/internal.h
libavformat/mov.c
libavformat/riff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r-- | libavformat/riff.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index cddbec477c..57d6ca68df 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -384,11 +384,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 }, }; @@ -757,16 +752,12 @@ enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps) id = ff_codec_get_id(ff_codec_wav_tags, tag); if (id <= 0) return id; - /* handle specific u8 codec */ - if (id == AV_CODEC_ID_PCM_S16LE && bps == 8) - id = AV_CODEC_ID_PCM_U8; - if (id == AV_CODEC_ID_PCM_S16LE && bps == 20 || - id == AV_CODEC_ID_PCM_S16LE && bps == 24) - id = AV_CODEC_ID_PCM_S24LE; - if (id == AV_CODEC_ID_PCM_S16LE && bps == 32) - id = AV_CODEC_ID_PCM_S32LE; - if (id == AV_CODEC_ID_PCM_F32LE && bps == 64) - id = AV_CODEC_ID_PCM_F64LE; + + if (id == AV_CODEC_ID_PCM_S16LE) + id = ff_get_pcm_codec_id(bps, 0, 0, ~1); + else if (id == AV_CODEC_ID_PCM_F32LE) + id = ff_get_pcm_codec_id(bps, 1, 0, 0); + if (id == AV_CODEC_ID_ADPCM_IMA_WAV && bps == 8) id = AV_CODEC_ID_PCM_ZORK; return id; |