sbc: audio: Initialise SBC data before use in sbcparse element

This commit is contained in:
Arun Raghavan 2012-09-26 09:54:01 +08:00 committed by Tim-Philipp Müller
parent 6979975963
commit dace80cc41

View file

@ -84,6 +84,8 @@ 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)
break;
@ -100,6 +102,8 @@ 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);