提交 20ddf5a8 编写于 作者: R Reimar Döffinger

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
上级 1cd98da8
...@@ -2117,7 +2117,8 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli ...@@ -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 y= (plane==0 || plane==3) ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample);
int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>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); fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128);
else else
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册