diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-02-12 12:22:48 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-16 01:29:17 +0100 |
commit | e7a9a0ef4b000a9aaf57f1bcd4ca2de3a22a96ec (patch) | |
tree | a913d296874ba615c11fc7dfc179556d21e9c76b /sys/directdraw | |
parent | c67d72290784cf6a62b81ace93a24ac9494885a8 (diff) | |
download | gstreamer-plugins-bad-e7a9a0ef4b000a9aaf57f1bcd4ca2de3a22a96ec.tar.gz |
[MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Properly chain up finalize functions. Fixes bug #515980.
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c:
(gst_ddrawsurface_class_init), (gst_ddrawsurface_finalize),
(gst_directdraw_sink_finalize):
Properly chain up finalize functions. Fixes bug #515980.
Diffstat (limited to 'sys/directdraw')
-rw-r--r-- | sys/directdraw/gstdirectdrawsink.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 9a028287d..1dd334c28 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -214,6 +214,7 @@ gst_directdraw_sink_init_interfaces (GType type) /* Subclass of GstBuffer which manages buffer_pool surfaces lifetime */ static void gst_ddrawsurface_finalize (GstMiniObject * mini_object); +static GstBufferClass *ddrawsurface_parent_class = NULL; static void gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) @@ -232,6 +233,8 @@ gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data) { GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class); + ddrawsurface_parent_class = g_type_class_peek_parent (g_class); + mini_object_class->finalize = GST_DEBUG_FUNCPTR (gst_ddrawsurface_finalize); } @@ -283,7 +286,7 @@ gst_ddrawsurface_finalize (GstMiniObject * mini_object) surface->width, surface->height, ddrawsink->video_width, ddrawsink->video_height); gst_directdraw_sink_surface_destroy (ddrawsink, surface); - + GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object); } else { /* In that case we can reuse the image and add it to our image pool. */ GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, @@ -296,10 +299,12 @@ gst_ddrawsurface_finalize (GstMiniObject * mini_object) ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface); g_mutex_unlock (ddrawsink->pool_lock); } + return; no_sink: GST_CAT_WARNING (directdrawsink_debug, "no sink found"); + GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object); return; } @@ -407,6 +412,8 @@ gst_directdraw_sink_finalize (GObject * object) if (ddrawsink->setup) { gst_directdraw_sink_cleanup (ddrawsink); } + + G_OBJECT_CLASS (parent_class)->finalize (object); } static void |