aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263dsp.h
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:55 +0100
commitd4aeaa21732898b0a09943ff2d885e04254e3a68 (patch)
treeb820788d28af4d7f14380d681e8d69cf4e49c79f /libavcodec/h263dsp.h
parent761bd6df06ec03aa32872712583852b20133d8ba (diff)
downloadffmpeg-d4aeaa21732898b0a09943ff2d885e04254e3a68.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 'libavcodec/h263dsp.h')
0 files changed, 0 insertions, 0 deletions