summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/bluez/gstavdtpsrc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/bluez/gstavdtpsrc.c b/sys/bluez/gstavdtpsrc.c
index 176c2d4d0..fee55053b 100644
--- a/sys/bluez/gstavdtpsrc.c
+++ b/sys/bluez/gstavdtpsrc.c
@@ -199,7 +199,7 @@ gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
value = gst_structure_get_value (structure, "mpegversion");
if (!value || !G_VALUE_HOLDS_INT (value)) {
GST_ERROR_OBJECT (avdtpsrc, "Failed to get mpegversion");
- goto fail;
+ return NULL;
}
gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT,
g_value_get_int (value), NULL);
@@ -207,7 +207,7 @@ gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
value = gst_structure_get_value (structure, "channels");
if (!value || !G_VALUE_HOLDS_INT (value)) {
GST_ERROR_OBJECT (avdtpsrc, "Failed to get channels");
- goto fail;
+ return NULL;
}
gst_caps_set_simple (caps, "channels", G_TYPE_INT,
g_value_get_int (value), NULL);
@@ -215,7 +215,7 @@ gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
value = gst_structure_get_value (structure, "base-profile");
if (!value || !G_VALUE_HOLDS_STRING (value)) {
GST_ERROR_OBJECT (avdtpsrc, "Failed to get base-profile");
- goto fail;
+ return NULL;
}
gst_caps_set_simple (caps, "base-profile", G_TYPE_STRING,
g_value_get_string (value), NULL);
@@ -228,7 +228,7 @@ gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
value = gst_structure_get_value (structure, "rate");
if (!value || !G_VALUE_HOLDS_INT (value)) {
GST_ERROR_OBJECT (avdtpsrc, "Failed to get sample rate");
- goto fail;
+ return NULL;
}
rate = g_value_get_int (value);
@@ -245,12 +245,6 @@ gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
}
return ret;
-
-fail:
- if (ret)
- gst_caps_unref (ret);
-
- return NULL;
}
static gboolean