diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-10-01 05:42:55 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-10-01 05:42:55 +0000 |
commit | b08de903cd96ff1d2f1b74c0e47c116f26561661 (patch) | |
tree | 66e983b646b04c2e9974714e2657be95c3e4350c /libavcodec | |
parent | 535497f193545614eeafe2a6644bfb486ced5b33 (diff) | |
download | ffmpeg-b08de903cd96ff1d2f1b74c0e47c116f26561661.tar.gz |
Make MS RLE decoder produce both bottom-up and top-down pictures
Originally committed as revision 20111 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/msrledec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index 7f9adcdce6..b8f5e6246b 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){ |