[FFmpeg-soc] [soc]: r2648 - mlp/mlpdec.c

ramiro subversion at mplayerhq.hu
Tue Jul 1 18:52:12 CEST 2008


Author: ramiro
Date: Tue Jul  1 18:52:12 2008
New Revision: 2648

Log:
Return -1 instead of INT32_MAX in read_huff_channels.

Modified:
   mlp/mlpdec.c

Modified: mlp/mlpdec.c
==============================================================================
--- mlp/mlpdec.c	(original)
+++ mlp/mlpdec.c	Tue Jul  1 18:52:12 2008
@@ -289,7 +289,7 @@ static inline void calculate_sign_huff(M
 }
 
 /** Read a sample, consisting of either, both or neither of entropy-coded MSBs
- *  and plain LSBs. Returns INT32_MAX if reading of vlc failed.
+ *  and plain LSBs.
  */
 
 static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,
@@ -313,7 +313,7 @@ static inline int read_huff_channels(MLP
                           VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS);
 
     if (result < 0)
-        return INT32_MAX;
+        return -1;
 
     if (lsb_bits > 0)
         result = (result << lsb_bits) + get_bits(gbp, lsb_bits);
@@ -806,7 +806,7 @@ static int read_block_data(MLPDecodeCont
            s->blocksize * sizeof(m->bypassed_lsbs[0]));
 
     for (i = 0; i < s->blocksize; i++) {
-        if (read_huff_channels(m, gbp, substr, i) == INT32_MAX)
+        if (read_huff_channels(m, gbp, substr, i) < 0)
             return -1;
     }
 



More information about the FFmpeg-soc mailing list