OSDN Git Service

Merge two if conditions, allow to decrese the level of indentation of
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 18 Feb 2010 21:12:05 +0000 (21:12 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 18 Feb 2010 21:12:05 +0000 (21:12 +0000)
the block.

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

libswscale/utils.c

index eebd40c..eb69074 100644 (file)
@@ -1566,17 +1566,17 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
     if (!param)
         param = default_param;
 
-    if (context) {
-        if (context->srcW != srcW || context->srcH != srcH ||
+    if (context &&
+        (context->srcW != srcW || context->srcH != srcH ||
             context->srcFormat != srcFormat ||
             context->dstW != dstW || context->dstH != dstH ||
             context->dstFormat != dstFormat || context->flags != flags ||
-            context->param[0] != param[0] || context->param[1] != param[1])
+            context->param[0] != param[0] || context->param[1] != param[1]))
         {
             sws_freeContext(context);
             context = NULL;
         }
-    }
+
     if (!context) {
         return sws_getContext(srcW, srcH, srcFormat,
                               dstW, dstH, dstFormat, flags,