mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
avfilter/vf_edgedetect: check if height is big enough
Fixes #8260
(cherry picked from commit ccf4ab8c9a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
c1ce4fba51
commit
3ee76a3ddb
@@ -122,6 +122,7 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
|
|||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
||||||
|
if (h > 1)
|
||||||
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
||||||
for (j = 2; j < h - 2; j++) {
|
for (j = 2; j < h - 2; j++) {
|
||||||
dst[0] = src[0];
|
dst[0] = src[0];
|
||||||
@@ -152,7 +153,9 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
|
|||||||
dst += dst_linesize;
|
dst += dst_linesize;
|
||||||
src += src_linesize;
|
src += src_linesize;
|
||||||
}
|
}
|
||||||
|
if (h > 2)
|
||||||
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
|
||||||
|
if (h > 3)
|
||||||
memcpy(dst, src, w);
|
memcpy(dst, src, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user