mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
glimagesink: unref the old buffer outside the lock
it could very well deadlock https://bugzilla.gnome.org/show_bug.cgi?id=723529
This commit is contained in:
parent
1cb7e22b98
commit
5eb4934750
1 changed files with 5 additions and 1 deletions
|
@ -759,6 +759,7 @@ static GstFlowReturn
|
|||
gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
|
||||
{
|
||||
GstGLImageSink *glimage_sink;
|
||||
GstBuffer *stored_buffer;
|
||||
|
||||
GST_TRACE ("rendering buffer:%p", buf);
|
||||
|
||||
|
@ -773,8 +774,11 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
|
|||
/* Avoid to release the texture while drawing */
|
||||
GST_GLIMAGE_SINK_LOCK (glimage_sink);
|
||||
glimage_sink->redisplay_texture = glimage_sink->next_tex;
|
||||
gst_buffer_replace (&glimage_sink->stored_buffer, buf);
|
||||
stored_buffer = glimage_sink->stored_buffer;
|
||||
glimage_sink->stored_buffer = gst_buffer_ref (buf);
|
||||
GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
|
||||
if (stored_buffer)
|
||||
gst_buffer_unref (stored_buffer);
|
||||
|
||||
/* Ask the underlying window to redraw its content */
|
||||
if (!gst_glimage_sink_redisplay (glimage_sink))
|
||||
|
|
Loading…
Reference in a new issue