# HG changeset patch # User kostya # Date 1254375977 0 # Node ID 3b0a2384ff9ff02e8b2a224917cd23a1f13e85bd # Parent 71cf44ecaa7082741c0e49a1d917f270f00fb250 Make BMP decoder produce flipped picture with RLE compression. This fixes issue 1415 diff -r 71cf44ecaa70 -r 3b0a2384ff9f bmp.c --- a/bmp.c Thu Oct 01 05:42:55 2009 +0000 +++ b/bmp.c Thu Oct 01 05:46:17 2009 +0000 @@ -253,7 +253,15 @@ buf = buf0 + hsize; } if(comp == BMP_RLE4 || comp == BMP_RLE8){ + if(height < 0){ + p->data[0] += p->linesize[0] * (avctx->height - 1); + p->linesize[0] = -p->linesize[0]; + } ff_msrle_decode(avctx, (AVPicture*)p, depth, buf, dsize); + if(height < 0){ + p->data[0] += p->linesize[0] * (avctx->height - 1); + p->linesize[0] = -p->linesize[0]; + } }else{ switch(depth){ case 1: