[vlc-commits] PulseAudio: show device product name rather than card number

Rémi Denis-Courmont git at videolan.org
Wed Jul 25 16:25:54 CEST 2012


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 25 17:23:06 2012 +0300| [fcf83fda1a4b750eaea646ebaa4ca75cfb8a0723] | committer: Rémi Denis-Courmont

PulseAudio: show device product name rather than card number

(cherry picked from commit 1ddac7d47eb3c34eeffb03be6261c766686a8f96)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=fcf83fda1a4b750eaea646ebaa4ca75cfb8a0723
---

 modules/services_discovery/pulse.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/services_discovery/pulse.c b/modules/services_discovery/pulse.c
index 725580d..0694cba 100644
--- a/modules/services_discovery/pulse.c
+++ b/modules/services_discovery/pulse.c
@@ -178,14 +178,10 @@ static int AddSource (services_discovery_t *sd, const pa_source_info *info)
         *dp = d;
     }
 
-    char *card;
-    if (info->card == PA_INVALID_INDEX
-     || unlikely(asprintf (&card, N_("Card %"PRIu32), info->card) == -1))
-        card = NULL;
+    const char *card = pa_proplist_gets(info->proplist, "device.product.name");
     services_discovery_AddItem (sd, item,
                                 (card != NULL) ? card : N_("Generic"));
     d->sd = sd;
-    free (card);
     return 0;
 }
 



More information about the vlc-commits mailing list