mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
videodecoder: do not leak events when flushing them
https://bugzilla.gnome.org/show_bug.cgi?id=736796
This commit is contained in:
parent
d8260cdb89
commit
29f548a7cd
1 changed files with 4 additions and 5 deletions
|
@ -1002,13 +1002,12 @@ _flush_events (GstPad * pad, GList * events)
|
|||
GList *tmp;
|
||||
|
||||
for (tmp = events; tmp; tmp = tmp->next) {
|
||||
if (GST_EVENT_TYPE (tmp->data) == GST_EVENT_EOS ||
|
||||
GST_EVENT_TYPE (tmp->data) == GST_EVENT_SEGMENT ||
|
||||
!GST_EVENT_IS_STICKY (tmp->data)) {
|
||||
gst_event_unref (tmp->data);
|
||||
} else {
|
||||
if (GST_EVENT_TYPE (tmp->data) != GST_EVENT_EOS &&
|
||||
GST_EVENT_TYPE (tmp->data) != GST_EVENT_SEGMENT &&
|
||||
GST_EVENT_IS_STICKY (tmp->data)) {
|
||||
gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data));
|
||||
}
|
||||
gst_event_unref (tmp->data);
|
||||
}
|
||||
g_list_free (events);
|
||||
|
||||
|
|
Loading…
Reference in a new issue