[FFmpeg-cvslog] r25345 - trunk/libavcodec/a64multienc.c

bindhammer subversion
Tue Oct 5 14:14:20 CEST 2010


Author: bindhammer
Date: Tue Oct  5 14:14:20 2010
New Revision: 25345

Log:
Add check for height when cropping.

Modified:
   trunk/libavcodec/a64multienc.c

Modified: trunk/libavcodec/a64multienc.c
==============================================================================
--- trunk/libavcodec/a64multienc.c	Tue Oct  5 14:14:14 2010	(r25344)
+++ trunk/libavcodec/a64multienc.c	Tue Oct  5 14:14:20 2010	(r25345)
@@ -49,11 +49,11 @@ static void to_meta_with_crop(AVCodecCon
     int width  = FFMIN(avctx->width ,C64XRES);
     uint8_t *src = p->data[0];
 
-    for (blocky = 0; blocky < height; blocky += 8) {
+    for (blocky = 0; blocky < C64YRES; blocky += 8) {
         for (blockx = 0; blockx < C64XRES; blockx += 8) {
-            for (y = blocky; y < blocky+8 && y < height; y++) {
+            for (y = blocky; y < blocky+8 && y < C64YRES; y++) {
                 for (x = blockx; x < blockx+8 && x < C64XRES; x += 2) {
-                    if(x < width) {
+                    if(x < width && y < height) {
                         /* build average over 2 pixels */
                         luma = (src[(x + 0 + y * p->linesize[0])] +
                                 src[(x + 1 + y * p->linesize[0])]) / 2;



More information about the ffmpeg-cvslog mailing list