aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-04-30 22:09:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-04-30 22:09:42 +0000
commit19a00c5eb20ad831d3b3284f7bec966e432f7b0a (patch)
tree20e73fb9b63766d2ea3b19dd840725117a8869c4 /libavcodec
parentd0dedce71d087c1b1b8012e782b497e99ad6f1d0 (diff)
downloadffmpeg-19a00c5eb20ad831d3b3284f7bec966e432f7b0a.tar.gz
avi bgr24 padding fix.
Fixes issue1901 Originally committed as revision 22997 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/rawdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 6caa7521f7..8b398d2dc9 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -152,6 +152,8 @@ static int raw_decode(AVCodecContext *avctx,
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);