summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-20 16:52:07 +0200
committerAnton Khirnov <anton@khirnov.net>2021-07-03 16:05:39 +0200
commit0fb014b7bb6e60cca8828467ec937cc51dbaa166 (patch)
treecd14c34f813ea4985cdf55cdef66c98148ee841d /libswscale
parent1f80789bf72cc9419d8d0040b7e89f72f6b071f5 (diff)
sws: reset sliceDir at the end of sws_scale()
Makes it more clear that resetting it does not interact with the scaling code that it is currently intermixed with.
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 75226a29e4..dbbb930f9a 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -983,10 +983,6 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
reset_ptr(src2, c->srcFormat);
reset_ptr((void*)dst2, c->dstFormat);
- /* reset slice direction at end of frame */
- if (srcSliceY_internal + srcSliceH == c->srcH)
- c->sliceDir = 0;
-
if (c->convert_unscaled)
ret = c->convert_unscaled(c, src2, srcStride2, srcSliceY_internal, srcSliceH,
dst2, dstStride2);
@@ -1004,5 +1000,9 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
rgb48Toxyz12(c, dst16, dst16, dstStride2[0]/2, ret);
}
+ /* reset slice direction at end of frame */
+ if (srcSliceY_internal + srcSliceH == c->srcH)
+ c->sliceDir = 0;
+
return ret;
}