summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-09-19 12:50:27 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-09-19 12:50:27 +0000
commit416a4f18cf4d0cc3126f9628165612477c4d7092 (patch)
treeb4e1a5fc1e59fc5b2cc14427355ab127fc929709 /ext
parentc058012d1794e7175593543fbb72ce42c08feca5 (diff)
downloadgst-plugins-bad-416a4f18cf4d0cc3126f9628165612477c4d7092.tar.gz
gst-plugins-bad-416a4f18cf4d0cc3126f9628165612477c4d7092.tar.bz2
gst-plugins-bad-416a4f18cf4d0cc3126f9628165612477c4d7092.zip
ext/directfb/dfbvideosink.c: When finalizing GstDfbSurface, a subclass of GstBuffer, correctly chain up to the parent...
Original commit message from CVS: * ext/directfb/dfbvideosink.c: (gst_dfbvideosink_surface_destroy), (gst_dfbsurface_class_init): When finalizing GstDfbSurface, a subclass of GstBuffer, correctly chain up to the parent class to free everything, including caps.
Diffstat (limited to 'ext')
-rw-r--r--ext/directfb/dfbvideosink.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c
index 92bd61b3..7f8f1092 100644
--- a/ext/directfb/dfbvideosink.c
+++ b/ext/directfb/dfbvideosink.c
@@ -144,6 +144,7 @@ static void gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
GstDfbSurface * surface);
static GstVideoSinkClass *parent_class = NULL;
+static GstBufferClass *surface_parent_class = NULL;
static const char *
gst_dfbvideosink_get_format_name (DFBSurfacePixelFormat format)
@@ -328,18 +329,14 @@ gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
surface->surface = NULL;
}
- if (GST_BUFFER (surface)->malloc_data) {
- g_free (GST_BUFFER (surface)->malloc_data);
- GST_BUFFER (surface)->malloc_data = NULL;
- }
-
if (surface->dfbvideosink) {
/* Release the ref to our sink */
surface->dfbvideosink = NULL;
gst_object_unref (dfbvideosink);
}
- return;
+ GST_MINI_OBJECT_CLASS (surface_parent_class)->
+ finalize (GST_MINI_OBJECT (surface));
}
static gpointer
@@ -1891,6 +1888,8 @@ gst_dfbsurface_class_init (gpointer g_class, gpointer class_data)
{
GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
+ surface_parent_class = g_type_class_peek_parent (g_class);
+
mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
gst_dfbsurface_finalize;
}