diff options
-rw-r--r-- | ext/directfb/dfbvideosink.c | 11 |
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; } |