[polypaudio-commits] r863 - /trunk/src/utils/pacat.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun May 14 09:17:18 PDT 2006


Author: lennart
Date: Sun May 14 18:17:17 2006
New Revision: 863

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=863&root=polypaudio&view=rev
Log:
take the filename specified on the command line as default stream name

Modified:
    trunk/src/utils/pacat.c

Modified: trunk/src/utils/pacat.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/utils/pacat.c?rev=863&root=polypaudio&r1=862&r2=863&view=diff
==============================================================================
--- trunk/src/utils/pacat.c (original)
+++ trunk/src/utils/pacat.c Sun May 14 18:17:17 2006
@@ -534,12 +534,6 @@
         }
     }
 
-    if (!client_name)
-        client_name = strdup(bn);
-
-    if (!stream_name)
-        stream_name = strdup(client_name);
-
     if (!pa_sample_spec_valid(&sample_spec)) {
         fprintf(stderr, "Invalid sample specification\n");
         goto quit;
@@ -571,12 +565,22 @@
             }
             
             close(fd);
+
+            if (!stream_name)
+                stream_name = strdup(argv[optind]);
+            
         } else {
             fprintf(stderr, "Too many arguments.\n");
             goto quit;
         }
     }
-    
+
+    if (!client_name)
+        client_name = strdup(bn);
+
+    if (!stream_name)
+        stream_name = strdup(client_name);
+
     /* Set up a new main loop */
     if (!(m = pa_mainloop_new())) {
         fprintf(stderr, "pa_mainloop_new() failed.\n");




More information about the pulseaudio-commits mailing list