aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-07-24 22:44:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-11-01 00:52:46 +0100
commit31262860ccd33b704a31f945fa1b9442b4e328c7 (patch)
tree6dee0d2614dd8cd0655484fe2bea9cbcf0fc1cf9
parentea160f02137e515a7909b73eba172da008af614a (diff)
downloadffmpeg-31262860ccd33b704a31f945fa1b9442b4e328c7.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 170f76bc56..c740f5d5fd 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -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;