[FFmpeg-cvslog] aiffdec: fix bits per sample

Michael Niedermayer git at videolan.org
Mon Aug 27 03:01:01 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 27 02:02:37 2012 +0200| [b9b97c2fb916982c87b74821117fc6c41a80aa7e] | committer: Michael Niedermayer

aiffdec: fix bits per sample

Fixes Ticket1660

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9b97c2fb916982c87b74821117fc6c41a80aa7e
---

 libavformat/aiffdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 83fa9c3..d56ab53 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);



More information about the ffmpeg-cvslog mailing list