diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-04 23:10:40 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-04 23:10:40 +0000 |
commit | a3d2379bdd821eec60f20ee3945047d659894bda (patch) | |
tree | 74a2d7643e755947b4f04abac3f2306dbd81c0f0 /libavcodec/flacdec.c | |
parent | d3f766124a5b47290a667db285c9f37d9bfab66f (diff) | |
download | ffmpeg-a3d2379bdd821eec60f20ee3945047d659894bda.tar.gz |
flacdec: Check curr_bps after wasted bits are subtracted.
Originally committed as revision 17813 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index b8ae73fea9..73e524a55d 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -432,10 +432,6 @@ static inline int decode_subframe(FLACContext *s, int channel) 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"); @@ -449,6 +445,10 @@ static inline int decode_subframe(FLACContext *s, int channel) wasted++; s->curr_bps -= wasted; } + if (s->curr_bps > 32) { + ff_log_missing_feature(s->avctx, "decorrelated bit depth > 32", 0); + return -1; + } //FIXME use av_log2 for types if (type == 0) { |