Make sws_setColorspaceDetails() return -1 if the destination format is
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 18 Apr 2009 11:53:59 +0000 (11:53 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 18 Apr 2009 11:53:59 +0000 (11:53 +0000)
not supported.

Originally committed as revision 29187 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale.c

index 132f35f..b563784 100644 (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;