mirror of https://github.com/mpv-player/mpv
ao_pipewire: clean up when hotplug_init fails
This commit is contained in:
parent
dadcb2e614
commit
7753a73a17
|
@ -754,7 +754,7 @@ static int hotplug_init(struct ao *ao)
|
||||||
|
|
||||||
int res = pipewire_init_boilerplate(ao);
|
int res = pipewire_init_boilerplate(ao);
|
||||||
if (res)
|
if (res)
|
||||||
return res;
|
goto error_no_unlock;
|
||||||
|
|
||||||
pw_thread_loop_lock(priv->loop);
|
pw_thread_loop_lock(priv->loop);
|
||||||
|
|
||||||
|
@ -777,6 +777,7 @@ static int hotplug_init(struct ao *ao)
|
||||||
|
|
||||||
error:
|
error:
|
||||||
pw_thread_loop_unlock(priv->loop);
|
pw_thread_loop_unlock(priv->loop);
|
||||||
|
error_no_unlock:
|
||||||
uninit(ao);
|
uninit(ao);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue