diff options
author | Haihua Hu <jared.hu@nxp.com> | 2016-09-06 13:13:39 +0800 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-09-07 00:15:02 +1000 |
commit | f15a3e3657e19c64ae9c377e3c7b11f0428976e4 (patch) | |
tree | 717015704bbf85ed22cd16a0d3d77eb8d7c5b908 /ext | |
parent | f3b0b22c48d03727475942e82a0230013a7951ca (diff) | |
download | gstreamer-plugins-bad-f15a3e3657e19c64ae9c377e3c7b11f0428976e4.tar.gz |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=770925
Diffstat (limited to 'ext')
-rw-r--r-- | ext/qt/gstqsgtexture.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc index 13208c05f..85747f260 100644 --- a/ext/qt/gstqsgtexture.cc +++ b/ext/qt/gstqsgtexture.cc @@ -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_) + return; + gst_gl_context_activate (this->qt_context_, TRUE); if (!this->buffer_) |