aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86/float_dsp_init.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-26 19:31:03 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-11-26 01:37:33 +0100
commit1d852105c200a313f9db34d2038dca6875a96780 (patch)
tree9844656a6c5c3f1ca30b5b2fceecee2433476a68 /libavutil/x86/float_dsp_init.c
parent8aeff8a0137042457b997094d4fe2930973c8cbf (diff)
downloadffmpeg-1d852105c200a313f9db34d2038dca6875a96780.tar.gz
s302m: fix arithmetic exception
If nb_samples is zero, the bit_rate calculation results in a division by zero. Since ff_get_buffer fails if frame->nb_samples is zero, this can be fixed by moving the bit_rate calculation after that function call. That also makes it possible to reuse the already calculated frame->nb_samples value. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit 04dfbc9441beed93984568c1547f1ed588122627) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavutil/x86/float_dsp_init.c')
0 files changed, 0 insertions, 0 deletions