# HG changeset patch # User ramiro # Date 1214395719 0 # Node ID 186eb61a9860a5a88f57f0ba341146c65718b6bc # Parent 7a73d76aaaa0d184d947db56fa5099810799858d Make it a little easier to spot that the code is not dealing only with substream headers. diff -r 7a73d76aaaa0 -r 186eb61a9860 mlp_parser.c --- a/mlp_parser.c Wed Jun 25 11:33:49 2008 +0000 +++ b/mlp_parser.c Wed Jun 25 12:08:39 2008 +0000 @@ -243,11 +243,11 @@ // 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++]; }