[FFmpeg-cvslog] r13961 - trunk/libavcodec/mlp_parser.c

ramiro subversion
Wed Jun 25 14:08:39 CEST 2008


Author: ramiro
Date: Wed Jun 25 14:08:39 2008
New Revision: 13961

Log:
Make it a little easier to spot that the code is not dealing only with
substream headers.

Modified:
   trunk/libavcodec/mlp_parser.c

Modified: trunk/libavcodec/mlp_parser.c
==============================================================================
--- trunk/libavcodec/mlp_parser.c	(original)
+++ trunk/libavcodec/mlp_parser.c	Wed Jun 25 14:08:39 2008
@@ -243,11 +243,11 @@ static int mlp_parse(AVCodecParserContex
         // Only check when this isn't a sync frame - syncs have a checksum.
 
         parity_bits = 0;
-        for (i = 0; i <= mp->num_substreams; i++) {
+        for (i = -1; i < mp->num_substreams; i++) {
             parity_bits ^= buf[p++];
             parity_bits ^= buf[p++];
 
-            if (i == 0 || buf[p-2] & 0x80) {
+            if (i < 0 || buf[p-2] & 0x80) {
                 parity_bits ^= buf[p++];
                 parity_bits ^= buf[p++];
             }




More information about the ffmpeg-cvslog mailing list