]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 't/gui_improvements'
authorAndre Noll <maan@systemlinux.org>
Sun, 20 Feb 2011 12:12:32 +0000 (13:12 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Feb 2011 12:12:32 +0000 (13:12 +0100)
audiod.c
configure.ac

index 64ea8a51efeeb13cb65f86d1ea417120679ff2f4..8b17d95fba692db0b2dd9126226cb8fb2cb682d5 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -823,6 +823,14 @@ static int parse_receiver_args(void)
                ret = get_audio_format_num(arg);
                if (ret < 0)
                        goto out;
+               /*
+                * If multiple receivers are given for this audio format, the
+                * last one wins and we have to free the previous receiver
+                * config here. Since we are iterating backwards, the winning
+                * receiver arg is in fact the first one given.
+                */
+               if (afi[ret].receiver_conf)
+                       afi[ret].receiver->free_config(afi[ret].receiver_conf);
                afi[ret].receiver_conf = check_receiver_arg(recv_arg, &receiver_num);
                if (!afi[ret].receiver_conf) {
                        ret = -E_RECV_SYNTAX;
@@ -830,9 +838,9 @@ static int parse_receiver_args(void)
                }
                afi[ret].receiver = &receivers[receiver_num];
        }
-       /* use the first available receiver with no arguments
-        * for those audio formats for which no receiver
-        * was specified
+       /*
+        * Use the first available receiver with no arguments for those audio
+        * formats for which no receiver was specified.
         */
        cmd = para_strdup(receivers[0].name);
        FOR_EACH_AUDIO_FORMAT(i) {
index f47a56df0c96f71d68e19b3655aa017925536a83..efde761f4f186459e05c1aec158319d4e2816068 100644 (file)
@@ -735,7 +735,6 @@ AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
 AC_DEFINE_UNQUOTED(SERVER_AUDIO_FORMATS, "$server_audio_formats",
        [formats supported by para_server and para_afh])
 
-
 AC_SUBST(executables, add_para($executables))
 
 recv_objs="$recv_cmdline_objs $recv_errlist_objs"