sws: revert: "swscale: Remove two bogus asserts"
[ffmpeg.git] / libswscale / swscale.c
index 4824271ce47db47b0c5891f310e9f8c6822fa1c7..daf7e90bdc5e569aac0b00a924842318dcaf53d6 100644 (file)
@@ -628,6 +628,8 @@ static int swScale(SwsContext *c, const uint8_t *src[],
                     }
                 }
             } else {
+                av_assert1(lumSrcPtr  + vLumFilterSize - 1 < lumPixBuf  + vLumBufSize * 2);
+                av_assert1(chrUSrcPtr + vChrFilterSize - 1 < chrUPixBuf + vChrBufSize * 2);
                 if (c->yuv2packed1 && vLumFilterSize == 1 &&
                     vChrFilterSize <= 2) { // unscaled RGB
                     int chrAlpha = vChrFilterSize == 1 ? 0 : vChrFilter[2 * dstY + 1];