diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-29 22:10:18 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-29 22:10:18 +0000 |
commit | 668d7c5817f285e018a609be940c53ffbf965ba8 (patch) | |
tree | a06d4081f3ad3552613231b63a5de9459821dfc1 | |
parent | adc1b1e2700fafab7ce208d42e8152f71007bf58 (diff) |
bugfix by Keiki SATOH <kki@wakusei.ne.jp>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6610 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/ad_msadpcm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libmpcodecs/ad_msadpcm.c b/libmpcodecs/ad_msadpcm.c index 4b9a5cebc4..7457cbc3d5 100644 --- a/libmpcodecs/ad_msadpcm.c +++ b/libmpcodecs/ad_msadpcm.c @@ -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 |