[MPlayer-cvslog] r27262 - trunk/libmpcodecs/ad_imaadpcm.c

reimar subversion at mplayerhq.hu
Fri Jul 11 21:29:41 CEST 2008


Author: reimar
Date: Fri Jul 11 21:29:41 2008
New Revision: 27262

Log:
Make really sure channels can only be 1 or 2 for imaadpcm


Modified:
   trunk/libmpcodecs/ad_imaadpcm.c

Modified: trunk/libmpcodecs/ad_imaadpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_imaadpcm.c	(original)
+++ trunk/libmpcodecs/ad_imaadpcm.c	Fri Jul 11 21:29:41 2008
@@ -167,7 +167,7 @@ static int qt_ima_adpcm_decode_block(uns
   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(uns
   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(un
   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;
 



More information about the MPlayer-cvslog mailing list