Mercurial > libavcodec.hg
changeset 11669:bd1701d38721 libavcodec
avi bgr24 padding fix.
Fixes issue1901
author | michael |
---|---|
date | Fri, 30 Apr 2010 22:09:42 +0000 |
parents | db33423d99ac |
children | 53584d5f86b8 |
files | rawdec.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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);