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

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


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

PulseAudio: show device product name rather than card number

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

 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 87076a6..0b81950 100644
--- a/modules/services_discovery/pulse.c
+++ b/modules/services_discovery/pulse.c
@@ -181,14 +181,10 @@ static int AddSource (services_discovery_t *sd, const pa_source_info *info)
         return 0;
     }
 
-    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