From 7813315a4c168e96f6d29e45d9e8ee8c304a3c4f Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 26 Feb 2015 12:06:23 +0100 Subject: [PATCH] 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) --- gst/playback/gstdecodebin2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 6e6b1becb4..94ebda98f5 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1916,7 +1916,7 @@ remove_error_filter (GstDecodeBin * dbin, GstElement * element, if (error) gst_message_replace (error, 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 { l = l->next; }