diff options
author | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2007-04-03 16:22:19 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2007-04-03 16:22:19 +0000 |
commit | 94bd08b0692ed88087b9086c884ca715e5078bd1 (patch) | |
tree | 58085026d31b705688c83878d12f81489a3cef51 /libswscale | |
parent | 12631f2dd0dd7af0885f3df3a63b3aa38b3da4ac (diff) | |
download | ffmpeg-streaming-94bd08b0692ed88087b9086c884ca715e5078bd1.zip ffmpeg-streaming-94bd08b0692ed88087b9086c884ca715e5078bd1.tar.gz |
Fix crash when trying to convert from or to RGBi (i<15) as in bgr8torgb24
Originally committed as revision 22910 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f6a2342..54924b0 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2086,6 +2086,13 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH /* 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; |