From 1a8f8ee46ee93387236112bd59fd251e1c1825f9 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 5 Feb 2014 00:44:18 +1100 Subject: glimagesink: remove unused stored_buffer field It has the potential to cause deadlocks. --- gst/gl/gstglimagesink.c | 6 ------ gst/gl/gstglimagesink.h | 1 - 2 files changed, 7 deletions(-) diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c index 84e1ee8..a609b1b 100644 --- a/gst/gl/gstglimagesink.c +++ b/gst/gl/gstglimagesink.c @@ -274,7 +274,6 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) glimage_sink->par_n = 0; glimage_sink->par_d = 1; glimage_sink->pool = NULL; - glimage_sink->stored_buffer = NULL; glimage_sink->redisplay_texture = 0; g_mutex_init (&glimage_sink->drawing_lock); @@ -547,10 +546,6 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) */ GST_GLIMAGE_SINK_LOCK (glimage_sink); glimage_sink->redisplay_texture = 0; - if (glimage_sink->stored_buffer) { - gst_buffer_unref (glimage_sink->stored_buffer); - glimage_sink->stored_buffer = NULL; - } GST_GLIMAGE_SINK_UNLOCK (glimage_sink); if (glimage_sink->upload) { @@ -758,7 +753,6 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf) /* Avoid to release the texture while drawing */ GST_GLIMAGE_SINK_LOCK (glimage_sink); glimage_sink->redisplay_texture = tex_id; - gst_buffer_replace (&glimage_sink->stored_buffer, buf); GST_GLIMAGE_SINK_UNLOCK (glimage_sink); /* Ask the underlying window to redraw its content */ diff --git a/gst/gl/gstglimagesink.h b/gst/gl/gstglimagesink.h index 63809da..88cdbff 100644 --- a/gst/gl/gstglimagesink.h +++ b/gst/gl/gstglimagesink.h @@ -77,7 +77,6 @@ struct _GstGLImageSink /* avoid replacing the stored_buffer while drawing */ GMutex drawing_lock; - GstBuffer *stored_buffer; GLuint redisplay_texture; #if GST_GL_HAVE_GLES2 -- cgit v1.2.3