aboutsummaryrefslogtreecommitdiffstats
path: root/compat
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:38:17 +0100
commit7bd9ae4afb248ba7b8a5cc772f5931c15808ae0f (patch)
tree1feec3f7375fd0df517e35dc4f7910a9a207f031 /compat
parent554dffb35f7902b9b607aa9c541ec4ea1a142102 (diff)
downloadffmpeg-7bd9ae4afb248ba7b8a5cc772f5931c15808ae0f.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 'compat')
0 files changed, 0 insertions, 0 deletions