# HG changeset patch # User cehoyos # Date 1175617339 0 # Node ID eb4d06df462fb1e0c44de9f8ca788b06ced7e161 # Parent cc7bece61de6a0e682837fe86fa34d59cf0ced73 Fix crash when trying to convert from or to RGBi (i<15) as in bgr8torgb24 diff -r cc7bece61de6 -r eb4d06df462f libswscale/swscale.c --- a/libswscale/swscale.c Tue Apr 03 16:12:24 2007 +0000 +++ b/libswscale/swscale.c Tue Apr 03 16:22:19 2007 +0000 @@ -2086,6 +2086,13 @@ /* 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;