mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gstadder: Don't forget to free pending events on flush/dispose.
Fixes #588747
This commit is contained in:
parent
9819a3519d
commit
3708ca37a8
1 changed files with 11 additions and 0 deletions
|
@ -781,6 +781,12 @@ gst_adder_sink_event (GstPad * pad, GstEvent * event)
|
|||
GST_OBJECT_LOCK (adder->collect);
|
||||
adder->segment_pending = TRUE;
|
||||
adder->flush_stop_pending = FALSE;
|
||||
/* Clear pending tags */
|
||||
if (adder->pending_events) {
|
||||
g_list_foreach (adder->pending_events, (GFunc) gst_event_unref, NULL);
|
||||
g_list_free (adder->pending_events);
|
||||
adder->pending_events = NULL;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (adder->collect);
|
||||
break;
|
||||
case GST_EVENT_TAG:
|
||||
|
@ -881,6 +887,11 @@ gst_adder_dispose (GObject * object)
|
|||
adder->collect = NULL;
|
||||
}
|
||||
gst_caps_replace (&adder->filter_caps, NULL);
|
||||
if (adder->pending_events) {
|
||||
g_list_foreach (adder->pending_events, (GFunc) gst_event_unref, NULL);
|
||||
g_list_free (adder->pending_events);
|
||||
adder->pending_events = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue