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>
Sun, 20 Dec 2015 15:13:09 +0000 (16:13 +0100)
commit7f33fef2a28dbc63ee98b0a217acabf760c5b7cd
tree2bd618c5af9d6700ce430c89938c6fdfc3e41516
parent3440a9ba4f37eeac98ed5322f9c5c3e9e7afd447
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