[MPlayer-cvslog] r22910 - trunk/libswscale/swscale.c

cehoyos subversion at mplayerhq.hu
Tue Apr 3 18:22:19 CEST 2007


Author: cehoyos
Date: Tue Apr  3 18:22:19 2007
New Revision: 22910

Modified:
   trunk/libswscale/swscale.c

Log:
Fix crash when trying to convert from or to RGBi (i<15) as in bgr8torgb24

Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c	(original)
+++ trunk/libswscale/swscale.c	Tue Apr  3 18:22:19 2007
@@ -2086,6 +2086,13 @@ SwsContext *sws_getContext(int srcW, int
 		/* rgb/bgr -> rgb/bgr (no dither needed forms) */
 		if(   (isBGR(srcFormat) || isRGB(srcFormat))
 		   && (isBGR(dstFormat) || isRGB(dstFormat)) 
+		   && srcFormat != PIX_FMT_BGR8 && dstFormat != PIX_FMT_BGR8
+		   && srcFormat != PIX_FMT_RGB8 && dstFormat != PIX_FMT_RGB8
+		   && srcFormat != PIX_FMT_BGR4 && dstFormat != PIX_FMT_BGR4
+		   && srcFormat != PIX_FMT_RGB4 && dstFormat != PIX_FMT_RGB4
+		   && srcFormat != PIX_FMT_BGR4_BYTE && dstFormat != PIX_FMT_BGR4_BYTE
+		   && srcFormat != PIX_FMT_RGB4_BYTE && dstFormat != PIX_FMT_RGB4_BYTE
+		   && srcFormat != PIX_FMT_MONOBLACK && dstFormat != PIX_FMT_MONOBLACK
 		   && !needsDither)
 			c->swScale= rgb2rgbWrapper;
 



More information about the MPlayer-cvslog mailing list