From ed0edb61cbf6c592eaba76440ba743887aa3f004 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 11 Jul 2008 19:29:41 +0000 Subject: Make really sure channels can only be 1 or 2 for imaadpcm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27262 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_imaadpcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmpcodecs/ad_imaadpcm.c b/libmpcodecs/ad_imaadpcm.c index eae7c11a54..a85cc68099 100644 --- a/libmpcodecs/ad_imaadpcm.c +++ b/libmpcodecs/ad_imaadpcm.c @@ -167,7 +167,7 @@ static int qt_ima_adpcm_decode_block(unsigned short *output, int initial_index[2]; int i; - if (channels > 1) channels = 2; + if (channels != 1) channels = 2; if (block_size < channels * QT_IMA_ADPCM_BLOCK_SIZE) return -1; @@ -217,7 +217,7 @@ static int ms_ima_adpcm_decode_block(unsigned short *output, int channel_index_l; int channel_index_r; - if (channels > 1) channels = 2; + if (channels != 1) channels = 2; if (block_size < MS_IMA_ADPCM_PREAMBLE_SIZE * channels) return -1; @@ -280,7 +280,7 @@ static int dk4_ima_adpcm_decode_block(unsigned short *output, int predictor[2]; int index[2]; - if (channels > 1) channels = 2; + if (channels != 1) channels = 2; if (block_size < MS_IMA_ADPCM_PREAMBLE_SIZE * channels) return -1; -- cgit v1.2.3