mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
pacat: Fail early if the media name cannot be set
Otherwise you get an "invalid argument" error from pa_stream_new later.
This commit is contained in:
parent
3b7c6b21f4
commit
3c4d43d9dc
1 changed files with 5 additions and 0 deletions
|
|
@ -1103,6 +1103,11 @@ int main(int argc, char *argv[]) {
|
||||||
if ((t = filename) ||
|
if ((t = filename) ||
|
||||||
(t = pa_proplist_gets(proplist, PA_PROP_APPLICATION_NAME)))
|
(t = pa_proplist_gets(proplist, PA_PROP_APPLICATION_NAME)))
|
||||||
pa_proplist_sets(proplist, PA_PROP_MEDIA_NAME, t);
|
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 */
|
/* Set up a new main loop */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue