diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-17 14:07:20 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-18 15:25:26 -0700 |
commit | 74d7ac95fbf4913406a81f85e2f020867e771b0e (patch) | |
tree | c8b0a4399853dedaa28ef0a2dd31c304be826a5e /libavcodec/adpcm.c | |
parent | 97219014407bf9a34a42d128b3e313ffff4e0dfe (diff) | |
download | ffmpeg-74d7ac95fbf4913406a81f85e2f020867e771b0e.tar.gz |
adpcm: convert adpcm_ima_apc to bytestream2.
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 16044d882e..90caf6563a 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -802,8 +802,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } break; case CODEC_ID_ADPCM_IMA_APC: - while (src < buf + buf_size) { - uint8_t v = *src++; + while (bytestream2_get_bytes_left(&gb) > 0) { + int v = bytestream2_get_byteu(&gb); *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); } |