From 9a5624a0f1b205e966391645a512c6dccdce42cd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 May 2011 02:20:20 +0200 Subject: [PATCH] rgb24toyv12: break out in the middle before out of array reads. Signed-off-by: Michael Niedermayer --- libswscale/rgb2rgb_template.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 9293c460d5..9af0eaa366 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -2264,6 +2264,9 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ ydst += lumStride; src += srcStride; + if(y+1 == height) + break; + for (i=0; i