Commit 4a5c372b authored by ramiro's avatar ramiro

mlpdec: Simplify check for substream_parity_present.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18240 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ef0c83a7
...@@ -1032,10 +1032,12 @@ static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, ...@@ -1032,10 +1032,12 @@ static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
if (substr == m->max_decoded_substream) if (substr == m->max_decoded_substream)
av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n"); av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n");
} }
if (substream_data_len[substr] * 8 - get_bits_count(&gb) >= 16 && if (substream_parity_present[substr]) {
substream_parity_present[substr]) {
uint8_t parity, checksum; uint8_t parity, checksum;
if (substream_data_len[substr] * 8 - get_bits_count(&gb) != 16)
goto substream_length_mismatch;
parity = ff_mlp_calculate_parity(buf, substream_data_len[substr] - 2); parity = ff_mlp_calculate_parity(buf, substream_data_len[substr] - 2);
checksum = ff_mlp_checksum8 (buf, substream_data_len[substr] - 2); checksum = ff_mlp_checksum8 (buf, substream_data_len[substr] - 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment