[FFmpeg-cvslog] r22997 - trunk/libavcodec/rawdec.c

michael subversion
Sat May 1 00:09:42 CEST 2010


Author: michael
Date: Sat May  1 00:09:42 2010
New Revision: 22997

Log:
avi bgr24 padding fix.
Fixes issue1901

Modified:
   trunk/libavcodec/rawdec.c

Modified: trunk/libavcodec/rawdec.c
==============================================================================
--- trunk/libavcodec/rawdec.c	Fri Apr 30 23:43:29 2010	(r22996)
+++ trunk/libavcodec/rawdec.c	Sat May  1 00:09:42 2010	(r22997)
@@ -152,6 +152,8 @@ static int raw_decode(AVCodecContext *av
         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);



More information about the ffmpeg-cvslog mailing list