Commit ac06d0d8 authored by Haihua Hu's avatar Haihua Hu Committed by Matthew Waters

qmlglsink: check qt_context_ first in GstQSGTexture::bind()

When start qmlglsink app, it will set NULL buffer to GstQSGTexture
in which case that qt_context_ will be a random value and cause
gst_gl_context_activate() fail.
parent a50b7c24
......@@ -45,6 +45,7 @@ GstQSGTexture::GstQSGTexture ()
gst_video_info_init (&this->v_info);
this->buffer_ = NULL;
this->qt_context_ = NULL;
this->sync_buffer_ = gst_buffer_new ();
......@@ -87,6 +88,9 @@ GstQSGTexture::bind ()
GstMemory *mem;
guint tex_id;
if (!this->qt_context_)
gst_gl_context_activate (this->qt_context_, TRUE);
if (!this->buffer_)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment