Mercurial > libavcodec.hg
comparison mlp_parser.c @ 7177:a82e7d9c8c34 libavcodec
Clarify comment about parity nibble.
author | ramiro |
---|---|
date | Wed, 02 Jul 2008 12:24:50 +0000 |
parents | ae78650d4ac8 |
children | 479fc906650f |
comparison
equal
deleted
inserted
replaced
7176:ae78650d4ac8 | 7177:a82e7d9c8c34 |
---|---|
236 mp->bytes_left = 0; | 236 mp->bytes_left = 0; |
237 | 237 |
238 sync_present = (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba; | 238 sync_present = (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba; |
239 | 239 |
240 if (!sync_present) { | 240 if (!sync_present) { |
241 // First nibble of a frame is a parity check of the first few nibbles. | 241 /* The first nibble of a frame is a parity check of the 4-byte |
242 * access unit header and all the 2- or 4-byte substream headers. */ | |
242 // Only check when this isn't a sync frame - syncs have a checksum. | 243 // Only check when this isn't a sync frame - syncs have a checksum. |
243 | 244 |
244 parity_bits = 0; | 245 parity_bits = 0; |
245 for (i = -1; i < mp->num_substreams; i++) { | 246 for (i = -1; i < mp->num_substreams; i++) { |
246 parity_bits ^= buf[p++]; | 247 parity_bits ^= buf[p++]; |