Browse Source

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
tags/v0.6
Reimar Döffinger 17 years ago
parent
commit
20ddf5a8e4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libswscale/swscale.c

+ 2
- 1
libswscale/swscale.c View File

@@ -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
{


Loading…
Cancel
Save