Commit 74d7ac95 authored by Ronald S. Bultje's avatar Ronald S. Bultje

adpcm: convert adpcm_ima_apc to bytestream2.

parent 97219014
...@@ -802,8 +802,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, ...@@ -802,8 +802,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
case CODEC_ID_ADPCM_IMA_APC: case CODEC_ID_ADPCM_IMA_APC:
while (src < buf + buf_size) { while (bytestream2_get_bytes_left(&gb) > 0) {
uint8_t v = *src++; int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3); *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment