[pulseaudio-discuss] [PATCH] introspect: Fix a minor ABI regression introduced in 85e7fbc196

Colin Guthrie colin at mageia.org
Thu Jan 9 03:44:21 PST 2014


It seems that when converting to profiles2, the extra NULL terminated
profile object used in profiles was dropped. This caused regressions
in e.g. pavucontrol and kcm_phonon which relied on the previous
(documented) behaviour.

The above said, this *shouldn't* be needed as far as I can see.
The use of pa_xnew0 should initialise the memory to zero and thus
these variables should already be NULL. Issues have been reported
so the problem does seem to need fixing in some capacity:

See https://bugs.mageia.org/show_bug.cgi?id=12155
---
 src/pulse/introspect.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 2d54fdb..e1dbdd0 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -902,6 +902,11 @@ static int fill_card_profile_info(pa_context *context, pa_tagstruct* t, pa_card_
         }
     }
 
+    /* Terminate with an extra NULL entry, just to make sure */
+    i->profiles[j].name = NULL;
+    i->profiles[j].description = NULL;
+    i->profiles2[j] = NULL;
+
     return 0;
 }
 
-- 
1.8.4.5



More information about the pulseaudio-discuss mailing list