mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
Don't assume that device reservation is enabled.
In the case when the alsa 'device' is not a physical card, it wont have an index and thus the reservation name will be NULL and therefore we will not initialise the reservation system. Fixes #498
This commit is contained in:
parent
116b38c972
commit
8fc9b19cb3
2 changed files with 2 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ static void reserve_update(struct userdata *u) {
|
||||||
const char *description;
|
const char *description;
|
||||||
pa_assert(u);
|
pa_assert(u);
|
||||||
|
|
||||||
if (!u->sink)
|
if (!u->sink || !u->reserve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((description = pa_proplist_gets(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
if ((description = pa_proplist_gets(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ static void reserve_update(struct userdata *u) {
|
||||||
const char *description;
|
const char *description;
|
||||||
pa_assert(u);
|
pa_assert(u);
|
||||||
|
|
||||||
if (!u->source)
|
if (!u->source || !u->reserve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((description = pa_proplist_gets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
if ((description = pa_proplist_gets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue