From 00a5bdf006ba800e0797ff4c2b732e5df4fa28ff Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 14 Dec 2025 09:06:44 +0900 Subject: internal/pipewire: do not emit None for spa_dict Turns out the PipeWire server does not expect a value of type None here at all. Signed-off-by: Ophestra --- internal/pipewire/core_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'internal/pipewire/core_test.go') diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go index 7785a74f..39fbcd67 100644 --- a/internal/pipewire/core_test.go +++ b/internal/pipewire/core_test.go @@ -311,7 +311,7 @@ func TestCoreCreateObject(t *testing.T) { encodingTestCases[pipewire.CoreCreateObject, *pipewire.CoreCreateObject]{ {"sample", []byte{ - /* size: rest of data */ 0x70, 0, 0, 0, + /* size: rest of data */ 0x80, 0, 0, 0, /* type: Struct */ 0xe, 0, 0, 0, /* size: 0x13 bytes */ 0x13, 0, 0, 0, @@ -343,8 +343,13 @@ func TestCoreCreateObject(t *testing.T) { /* value: 3 */ 3, 0, 0, 0, /* padding */ 0, 0, 0, 0, - /* size */ 0, 0, 0, 0, - /* type: None */ 1, 0, 0, 0, + /* size */ 0x10, 0, 0, 0, + /* type: Struct */ 0xe, 0, 0, 0, + + /* size: 4 bytes */ 4, 0, 0, 0, + /* type: Int */ 4, 0, 0, 0, + /* value: 0 */ 0, 0, 0, 0, + /* padding */ 0, 0, 0, 0, /* size: 4 bytes */ 4, 0, 0, 0, /* type: Int */ 4, 0, 0, 0, @@ -354,7 +359,7 @@ func TestCoreCreateObject(t *testing.T) { FactoryName: "spa-device-factory", Type: pipewire.PW_TYPE_INTERFACE_Device, Version: pipewire.PW_VERSION_FACTORY, - Properties: new(pipewire.SPADict), + Properties: &pipewire.SPADict{}, NewID: 0xbad, }, nil}, }.run(t) -- cgit v1.3.1