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.
This commit is contained in:
Anton Khirnov 2021-05-20 16:52:07 +02:00
parent 1f80789bf7
commit 0fb014b7bb
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}