diff options
author | Dave Robillard <dave@drobilla.net> | 2009-05-25 22:23:04 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-05-25 22:23:04 -0400 |
commit | e9f9ffa0e5ca0844a499a106963888176b6a7372 (patch) | |
tree | b86653bbb9f9f19c5d6adf29198bf2b168813cfe /gst/debugutils/fpsdisplaysink.c | |
parent | 9e306663812d0af7d6889c1c314f2148e2dd40cf (diff) | |
parent | 023af351fba4b22db782b39f4aa8ae75b70cc10f (diff) | |
download | gst-plugins-bad-e9f9ffa0e5ca0844a499a106963888176b6a7372.tar.gz gst-plugins-bad-e9f9ffa0e5ca0844a499a106963888176b6a7372.tar.bz2 gst-plugins-bad-e9f9ffa0e5ca0844a499a106963888176b6a7372.zip |
Merge git://anongit.freedesktop.org/gstreamer/gst-plugins-bad into lv2
Diffstat (limited to 'gst/debugutils/fpsdisplaysink.c')
-rw-r--r-- | gst/debugutils/fpsdisplaysink.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c index b37ab112..54f5cc54 100644 --- a/gst/debugutils/fpsdisplaysink.c +++ b/gst/debugutils/fpsdisplaysink.c @@ -267,11 +267,11 @@ fps_display_sink_start (GstFPSDisplaySink * self) gst_object_ref (self->text_overlay); g_object_set (self->text_overlay, "font-desc", DEFAULT_FONT, "silent", FALSE, NULL); - } - gst_bin_add (GST_BIN (self), self->text_overlay); + gst_bin_add (GST_BIN (self), self->text_overlay); - if (!gst_element_link (self->text_overlay, self->video_sink)) { - GST_ERROR_OBJECT (self, "Could not link elements"); + if (!gst_element_link (self->text_overlay, self->video_sink)) { + GST_ERROR_OBJECT (self, "Could not link elements"); + } } target_pad = gst_element_get_static_pad (self->text_overlay, "video_sink"); } @@ -280,6 +280,7 @@ no_text_overlay: if (self->text_overlay) { gst_element_unlink (self->text_overlay, self->video_sink); gst_bin_remove (GST_BIN (self), self->text_overlay); + self->text_overlay = NULL; } target_pad = gst_element_get_static_pad (self->video_sink, "sink"); } @@ -300,6 +301,13 @@ fps_display_sink_stop (GstFPSDisplaySink * self) g_source_remove (self->timeout_id); self->timeout_id = 0; } + + if (self->text_overlay) { + gst_element_unlink (self->text_overlay, self->video_sink); + gst_bin_remove (GST_BIN (self), self->text_overlay); + gst_object_unref (self->text_overlay); + self->text_overlay = NULL; + } } static void |