Mercurial > mplayer.hg
changeset 22892:eb4d06df462f
Fix crash when trying to convert from or to RGBi (i<15) as in bgr8torgb24
author | cehoyos |
---|---|
date | Tue, 03 Apr 2007 16:22:19 +0000 |
parents | cc7bece61de6 |
children | 777031848801 |
files | libswscale/swscale.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;