Mercurial > libavcodec.hg
diff rawdec.c @ 11669:bd1701d38721 libavcodec
avi bgr24 padding fix.
Fixes issue1901
author | michael |
---|---|
date | Fri, 30 Apr 2010 22:09:42 +0000 |
parents | 7dd2a45249a9 |
children | 378caf7b42ef |
line wrap: on
line diff
--- a/rawdec.c Fri Apr 30 21:43:29 2010 +0000 +++ b/rawdec.c Fri Apr 30 22:09:42 2010 +0000 @@ -152,6 +152,8 @@ memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE); avctx->palctrl->palette_changed = 0; } + if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size) + frame->linesize[0] = (frame->linesize[0]+3)&~3; if(context->flip) flip(avctx, picture);