ffmpeg | branch: release/2.2 | Andreas Cadhalpun <andreas.cadhal...@googlemail.com> | Fri Apr 24 00:01:43 2015 +0200| [1dcb68c02a55648facb82c0b2b6a1eb3dc18f988] | committer: Reinhard Tartler
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: Luca Barbato <lu_z...@gentoo.org> CC: libav-sta...@libav.org (cherry picked from commit cb5324200ccdc693dd5b28dcd7d4b722fad83ea2) Signed-off-by: Reinhard Tartler <siret...@tauware.de> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dcb68c02a55648facb82c0b2b6a1eb3dc18f988 --- libavcodec/alac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index f972531..7c2b925 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -305,6 +305,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); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog