mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
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
This commit is contained in:
parent
ca588e6a9f
commit
ed0edb61cb
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user