diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-06-26 19:31:03 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-07-19 09:36:13 +0200 |
commit | 72933729598240a05411d177a3f405b7694537de (patch) | |
tree | 649db68007b2e029d3c3747f7c5495e6e3af08f2 /presets | |
parent | 2e1226a695dd2faada939e0bdc3ee166b05c3579 (diff) | |
download | ffmpeg-72933729598240a05411d177a3f405b7694537de.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 'presets')
0 files changed, 0 insertions, 0 deletions