summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 06fd358d94..56157001f0 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -266,7 +266,7 @@ static double getSplineCoeff(double a, double b, double c, double d,
static av_cold int get_local_pos(SwsContext *s, int chr_subsample, int pos, int dir)
{
- if (pos < 0) {
+ if (pos == -1 || pos <= -513) {
pos = (128 << chr_subsample) - 128;
}
pos += 128; // relative to ideal left edge