mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
eglglessink: Fix GstContext refcounting some more
This commit is contained in:
parent
f398742608
commit
a8cca17027
1 changed files with 5 additions and 1 deletions
|
@ -1853,6 +1853,8 @@ gst_eglglessink_event (GstBaseSink * bsink, GstEvent * event)
|
||||||
GST_OBJECT_UNLOCK (eglglessink);
|
GST_OBJECT_UNLOCK (eglglessink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_context_unref (context);
|
||||||
|
|
||||||
return GST_BASE_SINK_CLASS (gst_eglglessink_parent_class)->event (bsink,
|
return GST_BASE_SINK_CLASS (gst_eglglessink_parent_class)->event (bsink,
|
||||||
event);
|
event);
|
||||||
break;
|
break;
|
||||||
|
@ -1894,6 +1896,7 @@ gst_eglglessink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
gst_context_set_egl_display (context,
|
gst_context_set_egl_display (context,
|
||||||
eglglessink->egl_context->display);
|
eglglessink->egl_context->display);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
|
gst_context_unref (context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1925,11 +1928,12 @@ gst_eglglessink_set_context (GstElement * element, GstContext * context)
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_OBJECT_LOCK (eglglessink);
|
GST_OBJECT_LOCK (eglglessink);
|
||||||
context = gst_context_make_writable (context);
|
context = gst_context_copy (context);
|
||||||
gst_context_set_egl_display (context, eglglessink->egl_context->display);
|
gst_context_set_egl_display (context, eglglessink->egl_context->display);
|
||||||
GST_OBJECT_UNLOCK (eglglessink);
|
GST_OBJECT_UNLOCK (eglglessink);
|
||||||
|
|
||||||
GST_ELEMENT_CLASS (parent_class)->set_context (element, context);
|
GST_ELEMENT_CLASS (parent_class)->set_context (element, context);
|
||||||
|
gst_context_unref (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue