]> git.pld-linux.org Git - packages/pipewire-wireplumber.git/blame - 876.patch
systemd-units epoch
[packages/pipewire-wireplumber.git] / 876.patch
CommitLineData
7f3de718
JP
1From afbc0ce57aac7aee8dc1651de4620f15c73dbace Mon Sep 17 00:00:00 2001
2From: Wim Taymans <wtaymans@redhat.com>
3Date: Mon, 21 Feb 2022 15:21:36 +0100
4Subject: [PATCH] si-audio-adapter: relax format parsing
5
6Some nodes can omit the format/rate/channels to indicate that they can
7deal with all possibilities and adapt to what they are linked to.
8
9See pipewire#876
10---
11 modules/module-si-audio-adapter.c | 11 ++---------
12 1 file changed, 2 insertions(+), 9 deletions(-)
13
14diff --git a/modules/module-si-audio-adapter.c b/modules/module-si-audio-adapter.c
15index f1f62185..84e393fd 100644
16--- a/modules/module-si-audio-adapter.c
17+++ b/modules/module-si-audio-adapter.c
18@@ -158,19 +158,12 @@ si_audio_adapter_find_format (WpSiAudioAdapter * self, WpNode * node)
19 struct spa_pod *position = NULL;
20 wp_spa_pod_fixate (pod);
21
22- /* defaults */
23 spa_zero(raw_format);
24- raw_format.format = SPA_AUDIO_FORMAT_F32;
25- raw_format.rate = si_audio_adapter_get_default_clock_rate (self);
26- raw_format.channels = 2;
27- raw_format.position[0] = SPA_AUDIO_CHANNEL_FL;
28- raw_format.position[1] = SPA_AUDIO_CHANNEL_FR;
29-
30 if (spa_pod_parse_object(wp_spa_pod_get_spa_pod (pod),
31 SPA_TYPE_OBJECT_Format, NULL,
32- SPA_FORMAT_AUDIO_format, SPA_POD_Id(&raw_format.format),
33+ SPA_FORMAT_AUDIO_format, SPA_POD_OPT_Id(&raw_format.format),
34 SPA_FORMAT_AUDIO_rate, SPA_POD_OPT_Int(&raw_format.rate),
35- SPA_FORMAT_AUDIO_channels, SPA_POD_Int(&raw_format.channels),
36+ SPA_FORMAT_AUDIO_channels, SPA_POD_OPT_Int(&raw_format.channels),
37 SPA_FORMAT_AUDIO_position, SPA_POD_OPT_Pod(&position)) < 0)
38 continue;
39
40--
41GitLab
42
This page took 0.078842 seconds and 4 git commands to generate.