1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

adpcm: convert adpcm_ct to bytestream2.

This commit is contained in:
Ronald S. Bultje 2012-03-17 15:33:43 -07:00
parent b3084e29e6
commit 834c81f4c5

View File

@ -1090,8 +1090,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
case CODEC_ID_ADPCM_CT: case CODEC_ID_ADPCM_CT:
for (n = nb_samples >> (1 - st); n > 0; n--, src++) { for (n = nb_samples >> (1 - st); n > 0; n--) {
uint8_t v = *src; int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 ); *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );
*samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F); *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);
} }