From edab4deb3a3eed7fd93b745aa9708eea5dd86572 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 6 Nov 2015 12:31:09 +0000 Subject: [PATCH] glshader, tsdemux: simplify code Jus use _delete_link() instead of _remove_link() + _free1() --- gst-libs/gst/gl/gstglshader.c | 3 +-- gst/mpegtsdemux/mpegtsparse.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c index fdaf2fc..cbd300d 100644 --- a/gst-libs/gst/gl/gstglshader.c +++ b/gst-libs/gst/gl/gstglshader.c @@ -408,9 +408,8 @@ gst_gl_shader_detach_unlocked (GstGLShader * shader, GstGLSLStage * stage) shader->priv->vtable.DetachShader (shader->priv->program_handle, stage_handle); - shader->priv->stages = g_list_remove_link (shader->priv->stages, elem); + shader->priv->stages = g_list_delete_link (shader->priv->stages, elem); gst_object_unref (stage); - g_list_free_1 (elem); } /** diff --git a/gst/mpegtsdemux/mpegtsparse.c b/gst/mpegtsdemux/mpegtsparse.c index 743da4f..6e4faf5 100644 --- a/gst/mpegtsdemux/mpegtsparse.c +++ b/gst/mpegtsdemux/mpegtsparse.c @@ -825,8 +825,7 @@ drain_pending_buffers (MpegTSParse2 * parse, gboolean drain_all) /* Free this list node and move to the next */ p = g_list_previous (l); - parse->pending_buffers = g_list_remove_link (parse->pending_buffers, l); - g_list_free_1 (l); + parse->pending_buffers = g_list_delete_link (parse->pending_buffers, l); l = p; } -- 2.7.4