diff libswscale/swscale.c @ 29422:532800a8d491

Fix regression when converting to nv12/nv21. Patch by Guennadi Liakhovetski, g D liakhovetski A gmx D de
author cehoyos
date Sat, 01 Aug 2009 21:30:36 +0000
parents 139af822b6ce
children 0673fad0546f
line wrap: on
line diff
--- a/libswscale/swscale.c	Fri Jul 31 20:13:02 2009 +0000
+++ b/libswscale/swscale.c	Sat Aug 01 21:30:36 2009 +0000
@@ -2759,7 +2759,9 @@
             || (isGray(dstFormat) && isGray(srcFormat))
             || (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat)
                 && c->chrDstHSubSample == c->chrSrcHSubSample
-                && c->chrDstVSubSample == c->chrSrcVSubSample))
+                && c->chrDstVSubSample == c->chrSrcVSubSample
+                && dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21
+                && srcFormat != PIX_FMT_NV12 && srcFormat != PIX_FMT_NV21))
         {
             if (isPacked(c->srcFormat))
                 c->swScale= packedCopy;