imc: reject files with unfathomable sampling rates
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Thu, 21 Aug 2014 10:21:07 +0000 (12:21 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Aug 2014 12:20:46 +0000 (14:20 +0200)
commit4728cdd88033c2bd41ae675d7df9aaf3f578136b
tree306e9a2d2fa6e40845dfba1e022ef1073c7f1462
parentb09ea25fec615c871ab8bfb00c3863aa0ce0d2c9
imc: reject files with unfathomable sampling rates

With huge sampling rates, the table derivation method does not converge fast
enough. While fixing it using e.g. Newton-Rhapson-like methods (the curve is
nicely convex) is possible, it is much simpler to reject these cases.

The value of 96000 was arbitrarily chosen as a realistic value, though
1000000 would still work and converge.

Fixes ticket #3868.

Suggested-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/imc.c