aaccoder: prevent crash of anmr coder
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 4 Dec 2015 17:13:07 +0000 (18:13 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 17 Dec 2015 20:37:15 +0000 (21:37 +0100)
commit4733060ef39466a443680e4f453e06d375844294
tree9ebd6b97643c86764261be6b6ff2d5eac0c78c5d
parente1b38b36853b67428447c1ea483bd27db7534e15
aaccoder: prevent crash of anmr coder

If minq is negative, the range of sf_idx can be larger than
SCALE_MAX_DIFF allows, causing assertion failures later in
encode_scale_factors.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 7a4652dd5da0502ff21c183b5ca7d76b1cfd6c51)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/aaccoder.c