]> git.sesse.net Git - ffmpeg/blobdiff - libswscale/swscale_unscaled.c
Merge commit 'b9ba5253dd1232be4b48cfe61c31ff4b3de3d10a'
[ffmpeg] / libswscale / swscale_unscaled.c
index 01396c2217d7516d0def0b8b2866fff7e105615c..55cda5dbd91eac9b01f64d1129d0e160a94137fe 100644 (file)
@@ -605,6 +605,9 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
         }
     }
 
+    if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
+        return NULL;
+
     return conv;
 }
 
@@ -965,7 +968,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
         f == AV_PIX_FMT_BGR32_1 ||\
         f == AV_PIX_FMT_BGR24)
 
-    if (isAnyRGB(srcFormat) && isPlanar(srcFormat) && isByteRGB(dstFormat))
+    if (srcFormat == AV_PIX_FMT_GBR24P && isPlanar(srcFormat) && isByteRGB(dstFormat))
         c->swScale = planarRgbToRgbWrapper;
 
     /* bswap 16 bits per pixel/component packed formats */