Don't write outside of the picture buffer in planarCopy in the gray case
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28985 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
1 parent
0c0d141564
commit
baf5ee6d67
1 file changed
+8
-2
@@ -1934,8 +1934,14 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
|
||||
|
||||
if ((isGray(c->srcFormat) || isGray(c->dstFormat)) && plane>0)
|
||||
{
|
||||
if (!isGray(c->dstFormat))
|
||||
memset(dst[plane], 128, dstStride[plane]*height);
|
||||
if (!isGray(c->dstFormat)){
|
||||
int i;
|
||||
uint8_t *ptr = dst[plane] + dstStride[plane]*y;
|
||||
for (i=0; i<height; i++){
|
||||
memset(ptr, 128, length);
|
||||
ptr += dstStride[plane];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user