diff options
Diffstat (limited to 'libswresample/dither.c')
-rw-r--r-- | libswresample/dither.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libswresample/dither.c b/libswresample/dither.c index 76f8ccf2c6..64068d35b6 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -102,6 +102,11 @@ av_cold int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AV if (out_fmt == AV_SAMPLE_FMT_S32 && s->dither.output_sample_bits) scale *= 1<<(32-s->dither.output_sample_bits); + if (scale == 0) { + s->dither.method = 0; + return 0; + } + s->dither.ns_pos = 0; s->dither.noise_scale= scale; s->dither.ns_scale = scale; |