# HG changeset patch # User michael # Date 1272665382 0 # Node ID bd1701d387210e7e0a94800f97ddfd5d79afde4f # Parent db33423d99ac8a327b6b4e55d0979f542598618d avi bgr24 padding fix. Fixes issue1901 diff -r db33423d99ac -r bd1701d38721 rawdec.c --- 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);