mirror of https://github.com/FFmpeg/FFmpeg.git
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>pull/227/head
parent
22291c372f
commit
04dfbc9441
1 changed files with 2 additions and 4 deletions
Loading…
Reference in new issue