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:
bbf6a4a
)
adpcm: Write the correct number of samples for ima-dk4
author
Luca Barbato
<lu_zero@gentoo.org>
Sun, 7 Jul 2013 10:56:12 +0000
(12:56 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 9 Jul 2013 08:49:29 +0000
(10:49 +0200)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/adpcm.c
patch
|
blob
|
history
diff --git
a/libavcodec/adpcm.c
b/libavcodec/adpcm.c
index
9502849
..
8b20321
100644
(file)
--- a/
libavcodec/adpcm.c
+++ b/
libavcodec/adpcm.c
@@
-770,7
+770,7
@@
static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
}
- for (n =
nb_samples >> (1 - st)
; n > 0; n--) {
+ for (n =
(nb_samples >> (1 - st)) - 1
; n > 0; n--) {
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);