From 6f348086914992ca739eb57d2233593ef766218d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 21 Mar 2009 10:20:16 +0000 Subject: Fix planarCopy to ignore the GRAY8 "pseudo"-palette, fixes libavtest regression test. Originally committed as revision 29021 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- libswscale/swscale.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libswscale') diff --git a/libswscale/swscale.c b/libswscale/swscale.c index e9b65c452d..bc35ad59ab 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2118,7 +2118,9 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli 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 { -- cgit v1.2.1