[FFmpeg-soc] [soc]: r2570 - mlp/mlpdec.c
ramiro
subversion at mplayerhq.hu
Wed Jun 25 02:30:53 CEST 2008
Author: ramiro
Date: Wed Jun 25 02:30:52 2008
New Revision: 2570
Log:
Correct header_size.
Modified:
mlp/mlpdec.c
Modified: mlp/mlpdec.c
==============================================================================
--- mlp/mlpdec.c (original)
+++ mlp/mlpdec.c Wed Jun 25 02:30:52 2008
@@ -969,7 +969,7 @@ static int read_access_unit(AVCodecConte
GetBitContext gb;
unsigned int length, substr, bytes_left;
unsigned int substream_start;
- unsigned int header_size;
+ unsigned int header_size = 4;
uint8_t substream_parity_present[MAX_SUBSTREAMS];
uint16_t substream_data_len[MAX_SUBSTREAMS];
uint8_t parity_bits = 0;
@@ -993,6 +993,7 @@ static int read_access_unit(AVCodecConte
dprintf(m->avctx, "Found major sync\n");
if (read_major_sync(m, &gb) < 0)
goto error;
+ header_size += 28;
buf += 28;
}
@@ -1002,7 +1003,6 @@ static int read_access_unit(AVCodecConte
return length;
}
- header_size = get_bits_count(&gb) >> 3;
substream_start = 0;
for (substr = 0; substr < m->num_substreams; substr++) {
@@ -1017,11 +1017,13 @@ static int read_access_unit(AVCodecConte
parity_bits ^= *buf++;
parity_bits ^= *buf++;
+ header_size += 2;
if (extraword_present) {
skip_bits(&gb, 16);
parity_bits ^= *buf++;
parity_bits ^= *buf++;
+ header_size += 2;
}
if (end + header_size > length) {
More information about the FFmpeg-soc
mailing list