Commit bce4da85 authored by Michael Niedermayer's avatar Michael Niedermayer

swresample/swresample: Fix input channel count in resample_first computation

Found-by: 's avatarMarcin Gorzel <gorzel@google.com>
Reviewed-by: 's avatarMarcin Gorzel <gorzel@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a37c6202
......@@ -318,7 +318,7 @@ av_cold int swr_init(struct SwrContext *s){
av_assert0(s->used_ch_count);
av_assert0(s->out.ch_count);
s->resample_first= RSC*s->out.ch_count/s->in.ch_count - RSC < s->out_sample_rate/(float)s-> in_sample_rate - 1.0;
s->resample_first= RSC*s->out.ch_count/s->used_ch_count - RSC < s->out_sample_rate/(float)s-> in_sample_rate - 1.0;
s->in_buffer= s->in;
s->silence = s->in;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment