Mercurial > libavcodec.hg
comparison mlpdec.c @ 9288:37313693196a libavcodec
mlpdec: Simplify check for substream_parity_present.
author | ramiro |
---|---|
date | Mon, 30 Mar 2009 03:46:52 +0000 |
parents | b00fc746bdf4 |
children | b799c2a83624 |
comparison
equal
deleted
inserted
replaced
9287:b00fc746bdf4 | 9288:37313693196a |
---|---|
1030 return -1; | 1030 return -1; |
1031 | 1031 |
1032 if (substr == m->max_decoded_substream) | 1032 if (substr == m->max_decoded_substream) |
1033 av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n"); | 1033 av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n"); |
1034 } | 1034 } |
1035 if (substream_data_len[substr] * 8 - get_bits_count(&gb) >= 16 && | 1035 if (substream_parity_present[substr]) { |
1036 substream_parity_present[substr]) { | |
1037 uint8_t parity, checksum; | 1036 uint8_t parity, checksum; |
1037 | |
1038 if (substream_data_len[substr] * 8 - get_bits_count(&gb) != 16) | |
1039 goto substream_length_mismatch; | |
1038 | 1040 |
1039 parity = ff_mlp_calculate_parity(buf, substream_data_len[substr] - 2); | 1041 parity = ff_mlp_calculate_parity(buf, substream_data_len[substr] - 2); |
1040 checksum = ff_mlp_checksum8 (buf, substream_data_len[substr] - 2); | 1042 checksum = ff_mlp_checksum8 (buf, substream_data_len[substr] - 2); |
1041 | 1043 |
1042 if ((get_bits(&gb, 8) ^ parity) != 0xa9 ) | 1044 if ((get_bits(&gb, 8) ^ parity) != 0xa9 ) |