projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
089a1f5
)
glbasefilter: Need to check the display before lock it.
author
He Junyan
<junyan.he@intel.com>
Fri, 6 Nov 2020 07:36:01 +0000
(15:36 +0800)
committer
He Junyan
<junyan.he@intel.com>
Thu, 3 Dec 2020 16:23:38 +0000
(
00:23
+0800)
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>
gst-libs/gst/gl/gstglbasefilter.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/gl/gstglbasefilter.c
b/gst-libs/gst/gl/gstglbasefilter.c
index
8671073
..
40f37e1
100644
(file)
--- a/
gst-libs/gst/gl/gstglbasefilter.c
+++ b/
gst-libs/gst/gl/gstglbasefilter.c
@@
-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 {