diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-21 10:20:16 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-21 10:20:16 +0000 |
commit | 3a4d381663a519f51e367bc6032fbb1ae32e8b32 (patch) | |
tree | 7f464556b3136d5cb419684cad94740718411c5a | |
parent | db6699ae24db8cb9315dacf93ab3d172b0cd0da4 (diff) |
Fix planarCopy to ignore the GRAY8 "pseudo"-palette, fixes libavtest regression test.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29021 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libswscale/swscale.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |