changeset 28983:c187b93afdf1

Avoid crash on planarCopy to a destination without alpha. Makes regression tests run again, though the results are still wrong.
author reimar
date Fri, 20 Mar 2009 17:22:03 +0000
parents a73861318395
children d903e09def74
files libswscale/swscale.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Fri Mar 20 16:29:47 2009 +0000
+++ b/libswscale/swscale.c	Fri Mar 20 17:22:03 2009 +0000
@@ -2117,7 +2117,8 @@
         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
         {