summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-11-24 10:54:38 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-11-24 10:54:38 +0100
commit6d6bf250dd46d408a1c3ba0d4b0acc9087e9a277 (patch)
treed903b8eaf79114bf3b4bc449cf709bc649c8da42
parent95903e3cfd2e922d7ba3d481812e8be1dbb7fd58 (diff)
riff: fix decoding of 24-bit packed int (type 1, 20-bit)
-rw-r--r--libavformat/riff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 89296e81c9..9a37760b41 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -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;