projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9721901
)
adpcm: convert adpcm_ima_apc to bytestream2.
author
Ronald S. Bultje
<rsbultje@gmail.com>
Sat, 17 Mar 2012 21:07:20 +0000
(14:07 -0700)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Sun, 18 Mar 2012 22:25:26 +0000
(15:25 -0700)
libavcodec/adpcm.c
patch
|
blob
|
history
diff --git
a/libavcodec/adpcm.c
b/libavcodec/adpcm.c
index 16044d882e7557c0a08a905446fe7b963a716c45..90caf6563a7024f54c02c5b0c6146554d3bcbce5 100644
(file)
--- 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);
}