1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

swscale/swscale_unscaled: don't add offsets to NULL pointers

Fixes: libswscale/swscale_unscaled.c:916:20: runtime error: applying zero offset to null pointer
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-07-13 19:50:57 -03:00
parent ee4ff3f706
commit af9b43455a

View File

@ -912,7 +912,7 @@ static int Rgb16ToPlanarRgb16Wrapper(SwsInternal *c, const uint8_t *const src[],
return srcSliceH; return srcSliceH;
} }
for(i=0; i<4; i++) { for (i = 0; i < 4 && dst[i]; i++) {
dst2013[i] += stride2013[i] * srcSliceY / 2; dst2013[i] += stride2013[i] * srcSliceY / 2;
dst1023[i] += stride1023[i] * srcSliceY / 2; dst1023[i] += stride1023[i] * srcSliceY / 2;
} }