Commit d62d8d9f authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

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.
parent 45aeb687
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org>
* sys/directdraw/gstdirectdrawsink.c:
(gst_ddrawsurface_class_init), (gst_ddrawsurface_finalize),
(gst_directdraw_sink_finalize):
Properly chain up finalize functions. Fixes bug #515980.
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org>
 
* sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize),
......
common @ 2a19465f
Subproject commit 05a617c9043ddb78f8578195b18c166d7e1d4c2e
Subproject commit 2a19465fdb43a75f4d32950fd2beb1beb950eec2
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment