Mercurial > mplayer.hg
diff libswscale/swscale.c @ 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 | 6601bf7365d5 |
children | ced556e1595a |
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 {