Browse Source

swresample/swresample: Fix input channel count in resample_first computation

Found-by: Marcin Gorzel <gorzel@google.com>
Reviewed-by: Marcin Gorzel <gorzel@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.1
Michael Niedermayer 6 years ago
parent
commit
bce4da85e8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libswresample/swresample.c

+ 1
- 1
libswresample/swresample.c View File

@@ -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;


Loading…
Cancel
Save