From 5ed71164a30861bdfc31c1138b5bbb1b302e7988 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 24 Jan 2007 12:51:20 +0000 Subject: [PATCH] ext/pango/gsttextoverlay.c: Don't unnecessarily ref (and then leak) upstream events if the text pad is not linked. Fi... Original commit message from CVS: * ext/pango/gsttextoverlay.c: (gst_text_overlay_src_event), (gst_text_overlay_text_event): Don't unnecessarily ref (and then leak) upstream events if the text pad is not linked. Fixes #399948. * tests/check/gst-plugins-base.supp: Add suppression for pango on edgy/x86 for textoverlay test. --- ChangeLog | 10 ++++++++++ ext/pango/gsttextoverlay.c | 10 +++++++--- tests/check/gst-plugins-base.supp | 9 +++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e0d2da..c745bb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-01-24 Tim-Philipp Müller + + * ext/pango/gsttextoverlay.c: (gst_text_overlay_src_event), + (gst_text_overlay_text_event): + Don't unnecessarily ref (and then leak) upstream events if the text + pad is not linked. Fixes #399948. + + * tests/check/gst-plugins-base.supp: + Add suppression for pango on edgy/x86 for textoverlay test. + 2007-01-24 Wim Taymans * gst-libs/gst/rtp/gstrtpbuffer.h: diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 42199a3..9679f9c 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -721,11 +721,14 @@ gst_text_overlay_src_event (GstPad * pad, GstEvent * event) } break; default: - gst_event_ref (event); - ret = gst_pad_push_event (overlay->video_sinkpad, event); if (overlay->text_linked) { - ret = gst_pad_push_event (overlay->text_sinkpad, event); + gst_event_ref (event); + ret = gst_pad_push_event (overlay->video_sinkpad, event); + gst_pad_push_event (overlay->text_sinkpad, event); + } else { + ret = gst_pad_push_event (overlay->video_sinkpad, event); } + break; } beach: @@ -1120,6 +1123,7 @@ gst_text_overlay_text_event (GstPad * pad, GstEvent * event) GST_OBJECT_LOCK (overlay); overlay->text_flushing = TRUE; overlay->text_eos = TRUE; + GST_INFO_OBJECT (overlay, "EOS"); /* wake up the video chain, it might be waiting for a text buffer or * a text segment update */ GST_TEXT_OVERLAY_BROADCAST (overlay); diff --git a/tests/check/gst-plugins-base.supp b/tests/check/gst-plugins-base.supp index 8b5a0ee..336882c 100644 --- a/tests/check/gst-plugins-base.supp +++ b/tests/check/gst-plugins-base.supp @@ -10,3 +10,12 @@ fun:theora_encode_YUVin } +# Suppression for pango on ubuntu edgy/x86 and textoverlay test +{ + + Memcheck:Param + access(pathname) + fun:access + fun:pango_config_key_get + fun:pango_find_map +} -- 2.7.4