mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
glbasefilter: Need to check the display before lock it.
In find_gl_context_unlocked(), the display of filter may be NULL and can cause crash if we directly access and lock it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
This commit is contained in:
parent
089a1f56b0
commit
1146a7e3a0
1 changed files with 5 additions and 0 deletions
|
@ -541,6 +541,11 @@ gst_gl_base_filter_find_gl_context_unlocked (GstGLBaseFilter * filter)
|
|||
|
||||
_find_local_gl_context_unlocked (filter);
|
||||
|
||||
if (!filter->display) {
|
||||
GST_WARNING_OBJECT (filter, "filter has NULL display.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!filter->context) {
|
||||
GST_OBJECT_LOCK (filter->display);
|
||||
do {
|
||||
|
|
Loading…
Reference in a new issue