test if color conv fonction exists prior to using it

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23206 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
benoit 2007-05-02 07:00:10 +00:00
parent 476078aed2
commit 75535c7902
1 changed files with 3 additions and 0 deletions

View File

@ -1611,6 +1611,8 @@ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int sr
sws_format_name(srcFormat), sws_format_name(dstFormat));
}
if(conv)
{
if (dstStride[0]*srcBpp == srcStride[0]*dstBpp)
conv(src[0], dst[0] + dstStride[0]*srcSliceY, srcSliceH*srcStride[0]);
else
@ -1626,6 +1628,7 @@ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int sr
dstPtr+= dstStride[0];
}
}
}
return srcSliceH;
}