summaryrefslogtreecommitdiff
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-20 17:22:03 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-20 17:22:03 +0000
commit20ddf5a8e4cb6ce8c9a6dcfbabf6d0cef2a712df (patch)
treef6ede19f8966dda9611cf41c6351bcca6fa44a5b /libswscale/swscale.c
parent1cd98da82071458468079e3dc15979c53c86491d (diff)
Avoid crash on planarCopy to a destination without alpha.
Makes regression tests run again, though the results are still wrong. Originally committed as revision 29018 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-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
{