Commit 78581edc authored by reimar's avatar reimar

Avoid crash on planarCopy to a destination without alpha.

Makes regression tests run again, though the results are still wrong.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@29018 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 0944972f
......@@ -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
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment