mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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
This commit is contained in:
parent
f3b0b22c48
commit
f15a3e3657
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@ GstQSGTexture::GstQSGTexture ()
|
||||||
|
|
||||||
gst_video_info_init (&this->v_info);
|
gst_video_info_init (&this->v_info);
|
||||||
this->buffer_ = NULL;
|
this->buffer_ = NULL;
|
||||||
|
this->qt_context_ = NULL;
|
||||||
this->sync_buffer_ = gst_buffer_new ();
|
this->sync_buffer_ = gst_buffer_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +88,9 @@ GstQSGTexture::bind ()
|
||||||
GstMemory *mem;
|
GstMemory *mem;
|
||||||
guint tex_id;
|
guint tex_id;
|
||||||
|
|
||||||
|
if (!this->qt_context_)
|
||||||
|
return;
|
||||||
|
|
||||||
gst_gl_context_activate (this->qt_context_, TRUE);
|
gst_gl_context_activate (this->qt_context_, TRUE);
|
||||||
|
|
||||||
if (!this->buffer_)
|
if (!this->buffer_)
|
||||||
|
|
Loading…
Reference in a new issue