Skip to contentSkip to conversation

Fix crash on gstreamer plugin if device doesn't support sbc

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Sep 13, 2010 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Fix crash on gstreamer plugin if device doesn't support sbc

From: Luiz Augusto von Dentz <[email protected]>

---
 audio/gstavdtpsink.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
audio/gstavdtpsink.c +3 -0
index f0e5b76..b8c8832 100644
@@ -448,6 +448,9 @@ static GstStructure *gst_avdtp_sink_parse_sbc_caps(
 	GValue *list;
 	gboolean mono, stereo;
 
+	if (sbc == NULL)
+		return NULL;
+
 	structure = gst_structure_empty_new("audio/x-sbc");
 	value = g_value_init(g_new0(GValue, 1), G_TYPE_STRING);
 
Signature · 1 line
1.7.1
#1 lore raw

Hi Luiz,

Quoted 8 lines · Luiz Augusto von Dentz
 audio/gstavdtpsink.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
audio/gstavdtpsink.c +0 -0
index f0e5b76..b8c8832 100644

audio/gstavdtpsink.c static GstStructure *gst_avdtp_sink_parse_sbc_caps( · line 456

Quoted 9 lines
audio/gstavdtpsink.c +3 -0
@@ -448,6 +448,9 @@ static GstStructure *gst_avdtp_sink_parse_sbc_caps(
 	GValue *list;
 	gboolean mono, stereo;
 
+	if (sbc == NULL)
+		return NULL;
+
 	structure = gst_structure_empty_new("audio/x-sbc");
 	value = g_value_init(g_new0(GValue, 1), G_TYPE_STRING);
 

The patch has been pushed upstream. Thanks.

Johan