Mercurial > libavcodec.hg
diff msrledec.c @ 10334:71cf44ecaa70 libavcodec
Make MS RLE decoder produce both bottom-up and top-down pictures
| author | kostya |
|---|---|
| date | Thu, 01 Oct 2009 05:42:55 +0000 |
| parents | e7032c44d4a7 |
| children | 35d05a2f4361 |
line wrap: on
line diff
--- a/msrledec.c Thu Oct 01 00:06:54 2009 +0000 +++ b/msrledec.c Thu Oct 01 05:42:55 2009 +0000 @@ -167,7 +167,8 @@ 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 @@ 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){
