[SCM] libav/experimental: Make MS RLE decoder produce both bottom-up and top-down pictures

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:52:17 UTC 2013


The following commit has been merged in the experimental branch:
commit b08de903cd96ff1d2f1b74c0e47c116f26561661
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Thu Oct 1 05:42:55 2009 +0000

    Make MS RLE decoder produce both bottom-up and top-down pictures
    
    Originally committed as revision 20111 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index 7f9adcd..b8f5e62 100644
--- a/libavcodec/msrledec.c
+++ b/libavcodec/msrledec.c
@@ -167,7 +167,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
                 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(AVCodecContext *avctx, AVPicture *pic, int de
                      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){

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list