[FFmpeg-cvslog] r20111 - trunk/libavcodec/msrledec.c

kostya subversion
Thu Oct 1 07:42:55 CEST 2009


Author: kostya
Date: Thu Oct  1 07:42:55 2009
New Revision: 20111

Log:
Make MS RLE decoder produce produce both bottom-up and up-bottom pictures

Modified:
   trunk/libavcodec/msrledec.c

Modified: trunk/libavcodec/msrledec.c
==============================================================================
--- trunk/libavcodec/msrledec.c	Thu Oct  1 02:06:54 2009	(r20110)
+++ trunk/libavcodec/msrledec.c	Thu Oct  1 07:42:55 2009	(r20111)
@@ -167,7 +167,8 @@ static int msrle_decode_8_16_24_32(AVCod
                 continue;
             }
             // Copy data
-            if (output + p2 * (depth >> 3) > output_end) {
+            if ((pic->linesize[0] > 0 && output + p2 * (depth >> 3) > output_end)
+              ||(pic->linesize[0] < 0 && output + p2 * (depth >> 3) < output_end)) {
                 src += p2 * (depth >> 3);
                 continue;
             }
@@ -211,7 +212,8 @@ static int msrle_decode_8_16_24_32(AVCod
                      src += 4;
                      break;
             }
-            if (output + p1 * (depth >> 3) > output_end)
+            if ((pic->linesize[0] > 0 && output + p1 * (depth >> 3) > output_end)
+              ||(pic->linesize[0] < 0 && output + p1 * (depth >> 3) < output_end))
                 continue;
             for(i = 0; i < p1; i++) {
                 switch(depth){



More information about the ffmpeg-cvslog mailing list