[FFmpeg-cvslog] rgb24toyv12: break out in the middle before out of array reads.
Michael Niedermayer
git at videolan.org
Thu May 5 02:29:57 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu May 5 02:20:20 2011 +0200| [9a5624a0f1b205e966391645a512c6dccdce42cd] | committer: Michael Niedermayer
rgb24toyv12: break out in the middle before out of array reads.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9a5624a0f1b205e966391645a512c6dccdce42cd
---
libswscale/rgb2rgb_template.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index 9293c46..9af0eaa 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<chromWidth; i++) {
unsigned int b = src[6*i+0];
unsigned int g = src[6*i+1];
More information about the ffmpeg-cvslog
mailing list