summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/gstsbcparse.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/audio/gstsbcparse.c b/audio/gstsbcparse.c
index 9f0c4d81..a15a75fb 100644
--- a/audio/gstsbcparse.c
+++ b/audio/gstsbcparse.c
@@ -55,10 +55,7 @@ static GstStaticPadTemplate sbc_parse_src_factory =
"subbands = (int) { 4, 8 }, "
"allocation = (string) { snr, loudness }"));
-/*
- Creates a fixed caps from the caps given.
-
-*/
+/* reates a fixed caps from the caps given. */
static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
{
GstCaps *result;
@@ -72,7 +69,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
structure = gst_caps_get_structure(caps, 0);
- /* rate */
if (!gst_structure_has_field(structure, "rate")) {
error = TRUE;
error_message = "no rate.";
@@ -89,7 +85,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
rate = temp;
}
- /* channels */
if (!gst_structure_has_field(structure, "channels")) {
error = TRUE;
error_message = "no channels.";
@@ -106,7 +101,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
channels = temp;
}
- /* blocks */
if (!gst_structure_has_field(structure, "blocks")) {
error = TRUE;
error_message = "no blocks.";
@@ -123,7 +117,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
blocks = temp;
}
- /* subbands */
if (!gst_structure_has_field(structure, "subbands")) {
error = TRUE;
error_message = "no subbands.";
@@ -140,7 +133,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
subbands = temp;
}
- /* allocation */
if (!gst_structure_has_field(structure, "allocation")) {
error = TRUE;
error_message = "no allocation.";
@@ -154,7 +146,6 @@ static GstCaps* sbc_parse_select_caps(GstSbcParse *parse, GstCaps *caps)
}
}
- /* mode */
if (!gst_structure_has_field(structure, "mode")) {
error = TRUE;
error_message = "no mode.";
@@ -175,7 +166,6 @@ error:
return NULL;
}
-
result = gst_caps_new_simple("audio/x-sbc",
"rate", G_TYPE_INT, rate,
"channels", G_TYPE_INT, channels,
@@ -250,14 +240,12 @@ static GstFlowReturn sbc_parse_chain(GstPad *pad, GstBuffer *buffer)
if (consumed <= 0)
break;
-
temp = GST_PAD_CAPS(parse->srcpad);
res = gst_pad_alloc_buffer_and_set_caps(parse->srcpad,
GST_BUFFER_OFFSET_NONE,
consumed, temp, &output);
-
if (res != GST_FLOW_OK)
goto done;