pango: fix bad unref and crashes with multiple text overlays
authorTim-Philipp Müller <tim@centricular.net>
Tue, 21 Aug 2012 21:51:38 +0000 (22:51 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 21 Aug 2012 21:51:38 +0000 (22:51 +0100)
gst_element_class_get_pad_template() does not return a ref,
so we mustn't unref the template returned. Fixes crashes
when switching back and forth between different types of
subtitle streams.

ext/pango/gstbasetextoverlay.c

index 072d680..1bc8ce7 100644 (file)
@@ -629,7 +629,6 @@ gst_base_text_overlay_init (GstBaseTextOverlay * overlay,
   if (template) {
     /* text sink */
     overlay->text_sinkpad = gst_pad_new_from_template (template, "text_sink");
-    gst_object_unref (template);
 
     gst_pad_set_event_function (overlay->text_sinkpad,
         GST_DEBUG_FUNCPTR (gst_base_text_overlay_text_event));