This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit a22189101b938b8acf645efa7bd9692c717bde6f Author: Niklas Haas <[email protected]> AuthorDate: Tue Feb 24 18:41:04 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Thu Feb 26 10:15:52 2026 +0000 swscale/unscaled: fix packedCopyWrapper for bitstream formats The assumption that w < stride is not held for such formats. Rather than this brittle logic we can just always copy the smaller of the two strides. This is unlikely to affect anything in practice, since usually AVFrames with the same size and format have matching linesizes, and so the fast path should be taken. However, in the unlikely case that they don't agree, this fixes an assertion failure when copying monow to monow. Reproduced by modifying libswscale to pick a larger-than-normal dst buffer alignment (and corresponding linesize), but reproducible in principle by any API user. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/swscale_unscaled.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index c9feb84c8e..38a9b467d4 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2132,14 +2132,8 @@ static int packedCopyWrapper(SwsInternal *c, const uint8_t *const src[], int i; const uint8_t *srcPtr = src[0]; uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY; - int length = 0; - - /* universal length finder */ - while (length + c->opts.src_w <= FFABS(dstStride[0]) && - length + c->opts.src_w <= FFABS(srcStride[0])) - length += c->opts.src_w; - av_assert1(length != 0); + const int length = FFMIN(FFABS(dstStride[0]), FFABS(srcStride[0])); for (i = 0; i < srcSliceH; i++) { memcpy(dstPtr, srcPtr, length); srcPtr += srcStride[0]; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
