pango: avoid unnecessary pango attribute list copy
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 25 Oct 2012 16:14:32 +0000 (17:14 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 25 Oct 2012 16:16:58 +0000 (17:16 +0100)
We just want to keep it alive, not modify it, so a
simple ref should be enough.

https://bugzilla.gnome.org/show_bug.cgi?id=686841

ext/pango/gstbasetextoverlay.c

index ebf8b9cb1cffa800b9d4963a1cbd6e38b743b5aa..5d08e951ba599de295ab8fbd2bd6dc0479af0628 100644 (file)
@@ -1380,7 +1380,7 @@ gst_base_text_overlay_render_pangocairo (GstBaseTextOverlay * overlay,
     PangoAttrList *origin_attr, *filtered_attr;
 
     origin_attr =
-        pango_attr_list_copy (pango_layout_get_attributes (overlay->layout));
+        pango_attr_list_ref (pango_layout_get_attributes (overlay->layout));
     filtered_attr =
         pango_attr_list_filter (pango_attr_list_copy (origin_attr),
         gst_text_overlay_filter_foreground_attr, NULL);