1
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 21:07:29 +01:00

bugfix by Keiki SATOH <kki@wakusei.ne.jp>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6610 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-06-29 22:10:18 +00:00
parent adc1b1e270
commit 668d7c5817

View File

@ -43,7 +43,7 @@ static int ms_adapt_coeff2[] =
0, -256, 0, 64, 0, -208, -232
};
#define MS_ADPCM_PREAMBLE_SIZE 7
#define MS_ADPCM_PREAMBLE_SIZE 6
#define LE_16(x) (le2me_16(*(unsigned short *)(x)))
#define LE_32(x) (le2me_32(*(unsigned int *)(x)))
@ -159,6 +159,17 @@ static int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
SE_16BIT(sample2[1]);
}
if (channels == 1)
{
output[out_ptr++] = sample2[0];
output[out_ptr++] = sample1[0];
} else {
output[out_ptr++] = sample2[0];
output[out_ptr++] = sample2[1];
output[out_ptr++] = sample1[0];
output[out_ptr++] = sample1[1];
}
while (stream_ptr < block_size)
{
// get the next nibble