glshader, tsdemux: simplify code
authorTim-Philipp Müller <tim@centricular.com>
Fri, 6 Nov 2015 12:31:09 +0000 (12:31 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 6 Nov 2015 13:00:55 +0000 (13:00 +0000)
Jus use _delete_link() instead of _remove_link() + _free1()

gst-libs/gst/gl/gstglshader.c
gst/mpegtsdemux/mpegtsparse.c

index fdaf2fcd7095d951b42a9f0b3ec63c67256d9d3d..cbd300d4a0d15dd8fc91cd55d8a6ac90addadaf4 100644 (file)
@@ -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);
 }
 
 /**
index 743da4f0d664fd05e416edef91af7b344760edd6..6e4faf50812da4b8cdb5acf82b3fd743ba9d0541 100644 (file)
@@ -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;
   }