mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/adpcm: fix sample count for stereo SBPRO3
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f9b9902ed90_7462_new_alaw.voc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
05fac0b45b
commit
785dc14654
@ -1310,7 +1310,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
byte & 0x0F, 4, 0);
|
byte & 0x0F, 4, 0);
|
||||||
}
|
}
|
||||||
} else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
|
} else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
|
||||||
for (n = nb_samples / 3; n > 0; n--) {
|
for (n = (nb_samples<<st) / 3; n > 0; n--) {
|
||||||
int byte = bytestream2_get_byteu(&gb);
|
int byte = bytestream2_get_byteu(&gb);
|
||||||
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
|
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
|
||||||
byte >> 5 , 3, 0);
|
byte >> 5 , 3, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user