mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-12 14:51:42 +00:00
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.
This commit is contained in:
parent
c058012d17
commit
416a4f18cf
1 changed files with 5 additions and 6 deletions
|
@ -144,6 +144,7 @@ static void gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
|
||||||
GstDfbSurface * surface);
|
GstDfbSurface * surface);
|
||||||
|
|
||||||
static GstVideoSinkClass *parent_class = NULL;
|
static GstVideoSinkClass *parent_class = NULL;
|
||||||
|
static GstBufferClass *surface_parent_class = NULL;
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
gst_dfbvideosink_get_format_name (DFBSurfacePixelFormat format)
|
gst_dfbvideosink_get_format_name (DFBSurfacePixelFormat format)
|
||||||
|
@ -328,18 +329,14 @@ gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
|
||||||
surface->surface = NULL;
|
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) {
|
if (surface->dfbvideosink) {
|
||||||
/* Release the ref to our sink */
|
/* Release the ref to our sink */
|
||||||
surface->dfbvideosink = NULL;
|
surface->dfbvideosink = NULL;
|
||||||
gst_object_unref (dfbvideosink);
|
gst_object_unref (dfbvideosink);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
GST_MINI_OBJECT_CLASS (surface_parent_class)->
|
||||||
|
finalize (GST_MINI_OBJECT (surface));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gpointer
|
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);
|
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)
|
mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
|
||||||
gst_dfbsurface_finalize;
|
gst_dfbsurface_finalize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue