Commit 8846af7b authored by kostya's avatar kostya

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

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20111 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b5c80811
......@@ -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){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment