summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-11 19:29:41 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-11 19:29:41 +0000
commited0edb61cbf6c592eaba76440ba743887aa3f004 (patch)
treebf70beec3a4ee534a54908000f8ebf36e875d620 /libmpcodecs
parentca588e6a9f8393cd9996a238bdaca5cbdfcf702f (diff)
downloadmpv-ed0edb61cbf6c592eaba76440ba743887aa3f004.tar.bz2
mpv-ed0edb61cbf6c592eaba76440ba743887aa3f004.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_imaadpcm.c6
1 files 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;