From 0eb3cc9ca49a5e66204ea2df2ad70f688592fd82 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 14 May 2001 22:42:42 +0000 Subject: [PATCH] Added a reference to typefind. Original commit message from CVS: Added a reference to typefind. --- gst/gsttypefind.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/gsttypefind.c b/gst/gsttypefind.c index 4be2265728..8cf427b336 100644 --- a/gst/gsttypefind.c +++ b/gst/gsttypefind.c @@ -186,12 +186,15 @@ gst_typefind_chain (GstPad *pad, GstBuffer *buf) { int oldstate = GST_STATE(typefind); + gst_object_ref (GST_OBJECT (typefind)); gtk_signal_emit (GTK_OBJECT (typefind), gst_typefind_signals[HAVE_TYPE], typefind->caps); if (GST_STATE(typefind) != oldstate) { + gst_object_unref (GST_OBJECT (typefind)); GST_DEBUG(0, "state changed during signal, aborting\n"); cothread_switch(cothread_current_main()); } + gst_object_unref (GST_OBJECT (typefind)); } gst_pad_set_caps (pad, caps);