[FFmpeg-cvslog] r17813 - trunk/libavcodec/flacdec.c

jbr subversion
Thu Mar 5 00:10:41 CET 2009


Author: jbr
Date: Thu Mar  5 00:10:40 2009
New Revision: 17813

Log:
flacdec: Check curr_bps after wasted bits are subtracted.

Modified:
   trunk/libavcodec/flacdec.c

Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c	Wed Mar  4 22:50:10 2009	(r17812)
+++ trunk/libavcodec/flacdec.c	Thu Mar  5 00:10:40 2009	(r17813)
@@ -432,10 +432,6 @@ 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");
@@ -449,6 +445,10 @@ static inline int decode_subframe(FLACCo
             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) {




More information about the ffmpeg-cvslog mailing list