mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
adpcm: Write the correct number of samples for ima-dk4
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
bbf6a4aa20
commit
12576afe20
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user