summaryrefslogtreecommitdiff
path: root/libswresample/resample_template.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2014-06-09 08:09:49 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-06-09 15:24:51 +0200
commitf341340552e2b70868a71aa55d3aebf3a27acc6d (patch)
tree101cc67273e65d94badbff5a2596abce86e11972 /libswresample/resample_template.c
parent637093a2db53614ab684461f0cf8e642b755e6ee (diff)
swr: handle 64bit overflow check in multiple_resample().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/resample_template.c')
-rw-r--r--libswresample/resample_template.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c
index 5151f585fc..73a672a4a3 100644
--- a/libswresample/resample_template.c
+++ b/libswresample/resample_template.c
@@ -133,8 +133,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
av_assert2(index >= 0);
*consumed= index;
index = 0;
- } else if (index >= 0 &&
- src_size*(int64_t)c->src_incr < (INT64_MAX >> (c->phase_shift+1))) {
+ } else if (index >= 0) {
int64_t end_index = (1LL + src_size - c->filter_length) << c->phase_shift;
int64_t delta_frac = (end_index - index) * c->src_incr - c->frac;
int delta_n = (delta_frac + c->dst_incr - 1) / c->dst_incr;