Revert "[880/906] glimagesink: remove unused stored_buffer field"

This reverts commit af3a68db7d.

Conflicts:
	ext/gl/gstglimagesink.c

https://bugzilla.gnome.org/show_bug.cgi?id=723529
This commit is contained in:
Matthew Waters 2014-05-30 11:35:04 +10:00 committed by Tim-Philipp Müller
parent b534e7e7af
commit 98e9ca7270
2 changed files with 9 additions and 2 deletions

View file

@ -269,10 +269,11 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink)
glimage_sink->clientReshapeCallback = NULL;
glimage_sink->clientDrawCallback = NULL;
glimage_sink->client_data = NULL;
glimage_sink->keep_aspect_ratio = TRUE;
glimage_sink->par_n = 1;
glimage_sink->keep_aspect_ratio = FALSE;
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);
@ -540,6 +541,10 @@ 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) {
@ -768,6 +773,7 @@ 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);
GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
/* Ask the underlying window to redraw its content */

View file

@ -79,6 +79,7 @@ struct _GstGLImageSink
/* avoid replacing the stored_buffer while drawing */
GMutex drawing_lock;
GstBuffer *stored_buffer;
GLuint redisplay_texture;
#if GST_GL_HAVE_GLES2