summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-02-02 04:42:00 +0000
committersfan5 <sfan5@live.de>2023-07-31 14:01:44 +0200
commitb3b7ee8f4c07f1174140e7612e25dca9a23e6cbb (patch)
tree103cb3788270a4c8bcae37c1484c4483ea2d0bc8 /audio/out
parent6e023547ead032f2323dff345f3b81d75e437ff2 (diff)
downloadmpv-b3b7ee8f4c07f1174140e7612e25dca9a23e6cbb.tar.bz2
mpv-b3b7ee8f4c07f1174140e7612e25dca9a23e6cbb.tar.xz
ao_pipewire: set media role during init()
wireplumber uses the media role when the node is first created. To have the property available at this point reliably we need to set it directly when creating the stream/node.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_pipewire.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
index 95624ab32a..0b3f5fb483 100644
--- a/audio/out/ao_pipewire.c
+++ b/audio/out/ao_pipewire.c
@@ -553,7 +553,7 @@ static int init(struct ao *ao)
struct pw_properties *props = pw_properties_new(
PW_KEY_MEDIA_TYPE, "Audio",
PW_KEY_MEDIA_CATEGORY, "Playback",
- PW_KEY_MEDIA_ROLE, "Movie",
+ PW_KEY_MEDIA_ROLE, ao->init_flags & AO_INIT_MEDIA_ROLE_MUSIC ? "Music" : "Movie",
PW_KEY_NODE_NAME, ao->client_name,
PW_KEY_NODE_DESCRIPTION, ao->client_name,
PW_KEY_APP_NAME, ao->client_name,