summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-20 17:22:03 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-20 17:22:03 +0000
commita0a1ec417c92cf26d1ffa3ad006a3cfbfb7271a4 (patch)
treee41e27a11b5dabe8c72d830c7bbe8e8ef1187c51 /libswscale
parent664d12c7be601c26471d94b25b81aaeb29b962ec (diff)
downloadmpv-a0a1ec417c92cf26d1ffa3ad006a3cfbfb7271a4.tar.bz2
mpv-a0a1ec417c92cf26d1ffa3ad006a3cfbfb7271a4.tar.xz
Avoid crash on planarCopy to a destination without alpha.
Makes regression tests run again, though the results are still wrong. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29018 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 3b0cd975fa..e9b65c452d 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2117,7 +2117,8 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
int y= (plane==0 || plane==3) ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample);
int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample);
- if (dst[plane] && !src[plane])
+ if (!dst[plane]) continue;
+ if (!src[plane])
fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128);
else
{