Skip to content
Snippets Groups Projects
Commit 243e8443 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato
Browse files

alac: Reject rice_limit 0 if compression is used


If in compression mode rice_limit = 0 leads to call
`show_bits(gb, k)` in `decode_scalar` with k = 0.

Request a sample in case it is valid and it should be accepted.

Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
parent 295e05a7
No related branches found
No related tags found
No related merge requests found
......@@ -307,6 +307,12 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
int lpc_quant[2];
int rice_history_mult[2];
if (!alac->rice_limit) {
avpriv_request_sample(alac->avctx,
"Compression with rice limit 0");
return AVERROR(ENOSYS);
}
decorr_shift = get_bits(&alac->gb, 8);
decorr_left_weight = get_bits(&alac->gb, 8);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment