GNOME Bugzilla – Bug 707088
capsfilter: Don't forget to update pending_events.
Last modified: 2013-09-18 16:49:33 UTC
When removing the first node using a copied pointer.
Created attachment 253558 [details] [review] capsfilter: Don't forget to update pending_events.
Review of attachment 253558 [details] [review]: ::: plugins/elements/gstcapsfilter.c @@ +371,3 @@ if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) { gst_event_unref (l->data); l = g_list_delete_link (l, l); Shouldn't this be filter->pending_events = g_list_delete_link (filter->pending_events, l); break; As there will be only a single segment event in the list I expect ?
It could be as well yes if that assumption holds.
Review of attachment 253558 [details] [review]: ::: plugins/elements/gstcapsfilter.c @@ +371,3 @@ if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) { gst_event_unref (l->data); l = g_list_delete_link (l, l); Yes, should just be what Olivier said.
Created attachment 253643 [details] [review] Does what Olivier said.
Review of attachment 253643 [details] [review]: ::: plugins/elements/gstcapsfilter.c @@ +369,1 @@ for (l = filter->pending_events; l;) { This could even be this, otherwise looks good. for (l = filter->pending_events; l; l = l->next) { if (...) {...} }
Created attachment 253644 [details] [review] Does what Olivier said because Olivier is right.
Pushed commit 76b5278f7ca11998cf0ad24e50ed4560a58bd22b Author: Mathieu Duponchelle <mathieu.duponchelle@epitech.eu> Date: Thu Aug 29 23:18:31 2013 +0200 capsfilter: Delete link directly in pending_events. When removing a segment event. https://bugzilla.gnome.org/show_bug.cgi?id=707088