static gboolean
sink_event_func (GstPad * pad, GstObject * parent, GstEvent * event)
{
- GList **expected = GST_PAD_ELEMENT_PRIVATE (pad);
+ GList **expected = GST_PAD_ELEMENT_PRIVATE (pad), *l;
GstEvent *exp;
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CAPS:{
GstCaps *recvcaps, *expectcaps;
- *expected = g_list_first (*expected);
- exp = GST_EVENT ((*expected)->data);
+ l = g_list_first (*expected);
+ exp = GST_EVENT (l->data);
gst_event_parse_caps (event, &recvcaps);
gst_event_parse_caps (exp, &expectcaps);
case GST_EVENT_SEGMENT:{
const GstSegment *recvseg, *expectseg;
- *expected = g_list_last (*expected);
- exp = GST_EVENT ((*expected)->data);
+ l = g_list_last (*expected);
+ exp = GST_EVENT (l->data);
gst_event_parse_segment (event, &recvseg);
gst_event_parse_segment (exp, &expectseg);
for (stream_cnt = 0; stream_cnt < NUM_SUBSTREAMS; ++stream_cnt) {
gst_object_unref (td.mysink[stream_cnt]);
+
+ g_list_free_full (expected[stream_cnt], (GDestroyNotify) gst_event_unref);
}
gst_object_unref (td.mysrc);