From: Maarten Bosmans Date: Mon, 10 Oct 2011 07:27:17 +0000 (+0200) Subject: pacat: Fail early if the media name cannot be set X-Git-Url: https://code.delx.au/pulseaudio/commitdiff_plain/3c4d43d9dc30ec54fe934b4b1370423a98d575f5 pacat: Fail early if the media name cannot be set Otherwise you get an "invalid argument" error from pa_stream_new later. --- diff --git a/src/utils/pacat.c b/src/utils/pacat.c index 3be1f6c8..3c8e3c7c 100644 --- a/src/utils/pacat.c +++ b/src/utils/pacat.c @@ -1103,6 +1103,11 @@ int main(int argc, char *argv[]) { if ((t = filename) || (t = pa_proplist_gets(proplist, PA_PROP_APPLICATION_NAME))) pa_proplist_sets(proplist, PA_PROP_MEDIA_NAME, t); + + if (!pa_proplist_contains(proplist, PA_PROP_MEDIA_NAME)) { + pa_log(_("Failed to set media name.")); + goto quit; + } } /* Set up a new main loop */