riff: fix decoding of 24-bit packed int (type 1, 20-bit)

This commit is contained in:
Piotr Bandurski 2012-11-24 10:54:38 +01:00 committed by Carl Eugen Hoyos
parent 95903e3cfd
commit 6d6bf250dd

View File

@ -759,7 +759,8 @@ enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
/* 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 == 24)
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;