summaryrefslogtreecommitdiff
path: root/sys/bluez/gstavdtpsink.c
diff options
context:
space:
mode:
authorChan-yeol Park <chanyeol.park@samsung.com>2012-04-16 11:59:59 +0900
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2013-01-09 14:30:13 +0000
commit6c31678d8b5cae7a33395461ef89929004ffae3a (patch)
treeeb102fedd9a916f93dc0b72583831f07274e4b3c /sys/bluez/gstavdtpsink.c
parent7470380792d982272c3525ac8b50b86b02c80aea (diff)
downloadgstreamer-plugins-bad-6c31678d8b5cae7a33395461ef89929004ffae3a.tar.gz
bluez: audio: Add SBC NULL check for GST AVDTP signaling
Due to RF condition or headset malfunctioning, gst audio plug-in could not get SBC (mandatory codec) information.
Diffstat (limited to 'sys/bluez/gstavdtpsink.c')
-rw-r--r--sys/bluez/gstavdtpsink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/bluez/gstavdtpsink.c b/sys/bluez/gstavdtpsink.c
index d237979bf..529f96c1d 100644
--- a/sys/bluez/gstavdtpsink.c
+++ b/sys/bluez/gstavdtpsink.c
@@ -1113,6 +1113,11 @@ 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 mandatory SBC sink");
+ return FALSE;
+ }
+
sbc_structure = gst_avdtp_sink_parse_sbc_caps (self, sbc);
mpeg_structure = gst_avdtp_sink_parse_mpeg_caps (self, mpeg);