[FFmpeg-cvslog] r17743 - trunk/libavcodec/flacdec.c
jbr
subversion
Tue Mar 3 05:45:46 CET 2009
Author: jbr
Date: Tue Mar 3 05:45:45 2009
New Revision: 17743
Log:
flacdec: Avoid trying to read 33 bits. This occurs when the source
is 32 bits-per-sample and channel decorrelation is used. Such files
are valid, but not supported currently.
Modified:
trunk/libavcodec/flacdec.c
Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c Tue Mar 3 03:53:11 2009 (r17742)
+++ trunk/libavcodec/flacdec.c Tue Mar 3 05:45:45 2009 (r17743)
@@ -37,6 +37,7 @@
#include "libavutil/crc.h"
#include "avcodec.h"
+#include "internal.h"
#include "bitstream.h"
#include "golomb.h"
#include "flac.h"
@@ -429,6 +430,10 @@ static inline int decode_subframe(FLACCo
if (s->decorrelation == LEFT_SIDE || s->decorrelation == MID_SIDE)
s->curr_bps++;
}
+ if (s->curr_bps > 32) {
+ ff_log_missing_feature(s->avctx, "decorrelated bit depth > 32", 0);
+ return -1;
+ }
if (get_bits1(&s->gb)) {
av_log(s->avctx, AV_LOG_ERROR, "invalid subframe padding\n");
More information about the ffmpeg-cvslog
mailing list