Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2009-03-30 07:46:52 +0400
committerRamiro Polla <ramiro.polla@gmail.com>2009-03-30 07:46:52 +0400
commitab79fa44f17533af6adc38d789775230d53d7ab8 (patch)
tree0f3775a15b434abce96799049756149f0323d9c6 /libavcodec/mlpdec.c
parent01aaf092746728aeb5290b6a19c721a85c12427e (diff)
mlpdec: Simplify check for substream_parity_present.
Originally committed as revision 18240 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index ef3071eec0..6d148b4735 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -1032,10 +1032,12 @@ static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
if (substr == m->max_decoded_substream)
av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n");
}
- if (substream_data_len[substr] * 8 - get_bits_count(&gb) >= 16 &&
- substream_parity_present[substr]) {
+ if (substream_parity_present[substr]) {
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);
checksum = ff_mlp_checksum8 (buf, substream_data_len[substr] - 2);