# HG changeset patch # User reimar # Date 1237630816 0 # Node ID ced556e1595afcba6ee4345a24ea8d6a2bcdc853 # Parent 1edc6f775ff48d304e7fc85c0e260cbe539b0f5e Fix planarCopy to ignore the GRAY8 "pseudo"-palette, fixes libavtest regression test. diff -r 1edc6f775ff4 -r ced556e1595a libswscale/swscale.c --- a/libswscale/swscale.c Sat Mar 21 09:31:57 2009 +0000 +++ b/libswscale/swscale.c Sat Mar 21 10:20:16 2009 +0000 @@ -2118,7 +2118,9 @@ int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample); if (!dst[plane]) continue; - if (!src[plane]) + // ignore palette for GRAY8 + if (plane == 1 && !dst[2]) continue; + if (!src[plane] || (plane == 1 && !src[2])) fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128); else {