mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
glimagesink: release stored buffers on drain query
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
This commit is contained in:
parent
af59b771fd
commit
c72498af92
1 changed files with 20 additions and 0 deletions
|
@ -564,6 +564,26 @@ gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
return gst_gl_handle_context_query ((GstElement *) glimage_sink, query,
|
return gst_gl_handle_context_query ((GstElement *) glimage_sink, query,
|
||||||
&glimage_sink->display, &glimage_sink->other_context);
|
&glimage_sink->display, &glimage_sink->other_context);
|
||||||
}
|
}
|
||||||
|
case GST_QUERY_DRAIN:
|
||||||
|
{
|
||||||
|
GstBuffer *buf = NULL;
|
||||||
|
|
||||||
|
GST_GLIMAGE_SINK_LOCK (glimage_sink);
|
||||||
|
glimage_sink->redisplay_texture = 0;
|
||||||
|
buf = glimage_sink->stored_buffer;
|
||||||
|
glimage_sink->stored_buffer = NULL;
|
||||||
|
GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
|
||||||
|
|
||||||
|
if (buf)
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
|
||||||
|
gst_buffer_replace (&glimage_sink->next_buffer, NULL);
|
||||||
|
gst_gl_upload_release_buffer (glimage_sink->upload);
|
||||||
|
glimage_sink->upload = NULL;
|
||||||
|
|
||||||
|
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue