aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-07-24 22:44:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-08-03 02:14:31 +0200
commit83ffda78ddb1f8f44fe964551bc27355b4a3a695 (patch)
tree19083721a980a177e9c12480c278431ace5eedc6
parent56b188941fd34d1d139f77c330d36baf66c9bc09 (diff)
downloadffmpeg-83ffda78ddb1f8f44fe964551bc27355b4a3a695.tar.gz
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 bce4da85e8110b66040a5fb07ffc724ab4e09a86) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswresample/swresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 47d4f0dd0b..54180e220c 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -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;