run as finalize, not dispose

Original commit message from CVS:
run as finalize, not dispose
This commit is contained in:
Thomas Vander Stichele 2004-06-17 14:15:23 +00:00
parent 4413314b2c
commit 718f2ddec0
3 changed files with 20 additions and 6 deletions

View file

@ -1,3 +1,14 @@
2004-06-17 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
add videorate
* sys/ximage/ximagesink.c: (gst_ximagesink_finalize),
(gst_ximagesink_class_init):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_finalize),
(gst_xvimagesink_class_init):
run them as finalize, not dispose, since dispose can be invoked
multiple times
2004-06-17 Wim Taymans <wim@fluendo.com>
* ext/alsa/gstalsa.c: (gst_alsa_init), (gst_alsa_dispose),

View file

@ -1242,7 +1242,7 @@ gst_ximagesink_get_property (GObject * object, guint prop_id,
}
static void
gst_ximagesink_dispose (GObject * object)
gst_ximagesink_finalize (GObject * object)
{
GstXImageSink *ximagesink;
@ -1256,7 +1256,7 @@ gst_ximagesink_dispose (GObject * object)
g_mutex_free (ximagesink->x_lock);
g_mutex_free (ximagesink->pool_lock);
G_OBJECT_CLASS (parent_class)->dispose (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
@ -1332,7 +1332,7 @@ gst_ximagesink_class_init (GstXImageSinkClass * klass)
"the X display in synchronous mode. (used only for debugging)", FALSE,
G_PARAM_READWRITE));
gobject_class->dispose = gst_ximagesink_dispose;
gobject_class->finalize = gst_ximagesink_finalize;
gobject_class->set_property = gst_ximagesink_set_property;
gobject_class->get_property = gst_ximagesink_get_property;

View file

@ -1627,8 +1627,11 @@ gst_xvimagesink_get_property (GObject * object, guint prop_id,
}
}
/* Finalize is called only once, dispose can be called multiple times.
* We use mutexes and don't reset stuff to NULL here so let's register
* as a finalize. */
static void
gst_xvimagesink_dispose (GObject * object)
gst_xvimagesink_finalize (GObject * object)
{
GstXvImageSink *xvimagesink;
@ -1642,7 +1645,7 @@ gst_xvimagesink_dispose (GObject * object)
g_mutex_free (xvimagesink->x_lock);
g_mutex_free (xvimagesink->pool_lock);
G_OBJECT_CLASS (parent_class)->dispose (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
@ -1734,7 +1737,7 @@ gst_xvimagesink_class_init (GstXvImageSinkClass * klass)
"the X display in synchronous mode. (used only for debugging)", FALSE,
G_PARAM_READWRITE));
gobject_class->dispose = gst_xvimagesink_dispose;
gobject_class->finalize = gst_xvimagesink_finalize;
gobject_class->set_property = gst_xvimagesink_set_property;
gobject_class->get_property = gst_xvimagesink_get_property;