mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
(cherry picked from commit bce4da85e8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
56b188941f
commit
83ffda78dd
@ -316,7 +316,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…
Reference in New Issue
Block a user