Mercurial > libavcodec.hg
changeset 10335:3b0a2384ff9f libavcodec
Make BMP decoder produce flipped picture with RLE compression.
This fixes issue 1415
author | kostya |
---|---|
date | Thu, 01 Oct 2009 05:46:17 +0000 |
parents | 71cf44ecaa70 |
children | a554d7e29e99 |
files | bmp.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: