mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
[813/906] unref the pool on shutdown
This commit is contained in:
parent
9b22b0e0ba
commit
65b6872413
2 changed files with 28 additions and 5 deletions
|
@ -1010,6 +1010,8 @@ gst_gl_mixer_set_allocation (GstGLMixer * mix,
|
||||||
GstQuery *oldquery;
|
GstQuery *oldquery;
|
||||||
GstGLMixerPrivate *priv = mix->priv;
|
GstGLMixerPrivate *priv = mix->priv;
|
||||||
|
|
||||||
|
GST_DEBUG ("storing allocation query");
|
||||||
|
|
||||||
GST_OBJECT_LOCK (mix);
|
GST_OBJECT_LOCK (mix);
|
||||||
oldpool = priv->pool;
|
oldpool = priv->pool;
|
||||||
priv->pool = pool;
|
priv->pool = pool;
|
||||||
|
@ -2171,6 +2173,16 @@ gst_gl_mixer_change_state (GstElement * element, GstStateChange transition)
|
||||||
walk = walk->next;
|
walk = walk->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mix->priv->query) {
|
||||||
|
gst_query_unref (mix->priv->query);
|
||||||
|
mix->priv->query = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mix->priv->pool) {
|
||||||
|
gst_object_unref (mix->priv->pool);
|
||||||
|
mix->priv->pool = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (mix->display) {
|
if (mix->display) {
|
||||||
gst_object_unref (mix->display);
|
gst_object_unref (mix->display);
|
||||||
mix->display = NULL;
|
mix->display = NULL;
|
||||||
|
|
|
@ -118,6 +118,8 @@ static void gst_glimage_sink_set_property (GObject * object, guint prop_id,
|
||||||
static void gst_glimage_sink_get_property (GObject * object, guint prop_id,
|
static void gst_glimage_sink_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * param_spec);
|
GValue * value, GParamSpec * param_spec);
|
||||||
|
|
||||||
|
static gboolean gst_glimage_sink_stop (GstBaseSink * bsink);
|
||||||
|
|
||||||
static gboolean gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query);
|
static gboolean gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query);
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
|
@ -250,6 +252,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
||||||
gstbasesink_class->preroll = gst_glimage_sink_render;
|
gstbasesink_class->preroll = gst_glimage_sink_render;
|
||||||
gstbasesink_class->render = gst_glimage_sink_render;
|
gstbasesink_class->render = gst_glimage_sink_render;
|
||||||
gstbasesink_class->propose_allocation = gst_glimage_sink_propose_allocation;
|
gstbasesink_class->propose_allocation = gst_glimage_sink_propose_allocation;
|
||||||
|
gstbasesink_class->stop = gst_glimage_sink_stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -330,11 +333,6 @@ gst_glimage_sink_finalize (GObject * object)
|
||||||
|
|
||||||
glimage_sink = GST_GLIMAGE_SINK (object);
|
glimage_sink = GST_GLIMAGE_SINK (object);
|
||||||
|
|
||||||
if (glimage_sink->pool) {
|
|
||||||
gst_object_unref (glimage_sink->pool);
|
|
||||||
glimage_sink->pool = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_mutex_clear (&glimage_sink->drawing_lock);
|
g_mutex_clear (&glimage_sink->drawing_lock);
|
||||||
|
|
||||||
g_free (glimage_sink->display_name);
|
g_free (glimage_sink->display_name);
|
||||||
|
@ -409,6 +407,19 @@ gst_glimage_sink_cleanup_glthread (GstGLImageSink * gl_sink)
|
||||||
* GstElement methods
|
* GstElement methods
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_glimage_sink_stop (GstBaseSink * bsink)
|
||||||
|
{
|
||||||
|
GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (bsink);
|
||||||
|
|
||||||
|
if (glimage_sink->pool) {
|
||||||
|
gst_object_unref (glimage_sink->pool);
|
||||||
|
glimage_sink->pool = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
|
gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue