summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-09-26 09:54:01 +0800
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-09-26 09:54:43 +0800
commit0a90dce55e6d6fe109959160adf912688608e0cd (patch)
treeb8bc6ca372246d51ace9d33fd7bc6be1e73cb7e3
parente29fc9c293367dd08a4628245313c9f621a0ca28 (diff)
audio: Initialise SBC data before use in sbcparse element
-rw-r--r--audio/gstsbcparse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/gstsbcparse.c b/audio/gstsbcparse.c
index bc4c0c7c..c12e1072 100644
--- a/audio/gstsbcparse.c
+++ b/audio/gstsbcparse.c
@@ -85,6 +85,8 @@ static GstFlowReturn sbc_parse_chain(GstPad *pad, GstBuffer *buffer)
GstBuffer *output;
int consumed;
+ sbc_init(&parse->new_sbc, 0);
+
consumed = sbc_parse(&parse->new_sbc, data + offset,
size - offset);
if (consumed <= 0)
@@ -103,6 +105,8 @@ static GstFlowReturn sbc_parse_chain(GstPad *pad, GstBuffer *buffer)
parse->first_parsing = FALSE;
}
+ sbc_finish(&parse->new_sbc);
+
res = gst_pad_alloc_buffer_and_set_caps(parse->srcpad,
GST_BUFFER_OFFSET_NONE,
consumed, parse->outcaps, &output);