[MPlayer-cvslog] r32347 - trunk/libaf/af.c

reimar subversion at mplayerhq.hu
Sat Sep 25 13:55:56 CEST 2010


Author: reimar
Date: Sat Sep 25 13:55:56 2010
New Revision: 32347

Log:
Minor simplification of af_init.

Modified:
   trunk/libaf/af.c

Modified: trunk/libaf/af.c
==============================================================================
--- trunk/libaf/af.c	Sat Sep 25 12:49:39 2010	(r32346)
+++ trunk/libaf/af.c	Sat Sep 25 13:55:56 2010	(r32347)
@@ -439,11 +439,7 @@ int af_init(af_stream_t* s)
   // Check if this is the first call
   if(!s->first){
     // Add all filters in the list (if there are any)
-    if(!s->cfg.list){      // To make automatic format conversion work
-      if(!af_append(s,s->first,"dummy"))
-	return -1;
-    }
-    else{
+    if (s->cfg.list) {
       while(s->cfg.list[i]){
 	if(!af_append(s,s->last,s->cfg.list[i++]))
 	  return -1;
@@ -451,6 +447,11 @@ int af_init(af_stream_t* s)
     }
   }
 
+  // If we do not have any filters otherwise
+  // add dummy to make automatic format conversion work
+  if (!s->first && !af_append(s, s->first, "dummy"))
+    return -1;
+
   // Init filters
   if(AF_OK != af_reinit(s,s->first))
     return -1;


More information about the MPlayer-cvslog mailing list