playback: Fix broken GList modification

When we modify a GList (via g_list_delete_link), always reassign the
new head to the original GList. Otherwise we end up with
filtered_errors being corrupt (the head might have been the element
removed)
This commit is contained in:
Edward Hervey 2015-02-26 12:06:23 +01:00
parent a2d29c2f8a
commit 7813315a4c

View file

@ -1916,7 +1916,7 @@ remove_error_filter (GstDecodeBin * dbin, GstElement * element,
if (error) if (error)
gst_message_replace (error, msg); gst_message_replace (error, msg);
gst_message_unref (msg); gst_message_unref (msg);
l = g_list_delete_link (dbin->filtered_errors, l); l = dbin->filtered_errors = g_list_delete_link (dbin->filtered_errors, l);
} else { } else {
l = l->next; l = l->next;
} }