From: Chan-yeol Park <[email protected]>
Due to RF condition or headset malfunctioning, gst audio plug-in
could not get sbc(mandatory codec) information.
---
audio/gstavdtpsink.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
index b448d57..1d50914 100644
--- a/audio/gstavdtpsink.c
+++ b/audio/gstavdtpsink.c
@@ -1121,6 +1121,11 @@ static gboolean gst_avdtp_sink_update_caps(GstAvdtpSink *self)
sbc = (void *) gst_avdtp_find_caps(self, BT_A2DP_SBC_SINK);
mpeg = (void *) gst_avdtp_find_caps(self, BT_A2DP_MPEG12_SINK);
+ if(!sbc) {
+ GST_ERROR_OBJECT(self, "Failed to find sbc(mandatory codec)");
+ return FALSE;
+ }
+
sbc_structure = gst_avdtp_sink_parse_sbc_caps(self, sbc);
mpeg_structure = gst_avdtp_sink_parse_mpeg_caps(self, mpeg);
--
1.7.5.4