mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
glimagesink: unref the pool in the correct place
Otherwise we could hold a pool to a context that is never going to be used. https://bugzilla.gnome.org/show_bug.cgi?id=748405
This commit is contained in:
parent
c6ec145a95
commit
05109be4a0
1 changed files with 7 additions and 5 deletions
|
@ -864,11 +864,6 @@ gst_glimage_sink_stop (GstBaseSink * bsink)
|
||||||
{
|
{
|
||||||
GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (bsink);
|
GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (bsink);
|
||||||
|
|
||||||
if (glimage_sink->pool) {
|
|
||||||
gst_object_unref (glimage_sink->pool);
|
|
||||||
glimage_sink->pool = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,6 +937,13 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
GST_VIDEO_SINK_WIDTH (glimage_sink) = 1;
|
GST_VIDEO_SINK_WIDTH (glimage_sink) = 1;
|
||||||
GST_VIDEO_SINK_HEIGHT (glimage_sink) = 1;
|
GST_VIDEO_SINK_HEIGHT (glimage_sink) = 1;
|
||||||
|
|
||||||
|
/* we're losing the context, this pool is no use anymore */
|
||||||
|
if (glimage_sink->pool) {
|
||||||
|
gst_object_unref (glimage_sink->pool);
|
||||||
|
glimage_sink->pool = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (glimage_sink->context) {
|
if (glimage_sink->context) {
|
||||||
GstGLWindow *window = gst_gl_context_get_window (glimage_sink->context);
|
GstGLWindow *window = gst_gl_context_get_window (glimage_sink->context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue