1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Make sws_setColorspaceDetails() return -1 if the destination format is

not supported.

Originally committed as revision 29187 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
Stefano Sabatini 2009-04-18 11:53:59 +00:00
parent 2d26fa2822
commit 0c067dc34b

View File

@ -2294,7 +2294,7 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
c->saturation= saturation;
c->srcRange = srcRange;
c->dstRange = dstRange;
if (isYUV(c->dstFormat) || isGray(c->dstFormat)) return 0;
if (isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1;
c->uOffset= 0x0400040004000400LL;
c->vOffset= 0x0400040004000400LL;