From b9b97c2fb916982c87b74821117fc6c41a80aa7e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Aug 2012 02:02:37 +0200 Subject: [PATCH] aiffdec: fix bits per sample Fixes Ticket1660 Signed-off-by: Michael Niedermayer --- libavformat/aiffdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 83fa9c3548..d56ab5306d 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -105,7 +105,7 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size, codec->codec_type = AVMEDIA_TYPE_AUDIO; codec->channels = avio_rb16(pb); num_frames = avio_rb32(pb); - codec->bits_per_coded_sample = avio_rb16(pb); + codec->bits_per_coded_sample = avio_rb16(pb) / FFMAX(codec->channels, 1); exp = avio_rb16(pb); val = avio_rb64(pb);