projects
/
platform
/
upstream
/
gst-plugins-bad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c16395
)
d3dvideosink: Fix crash on WinProc handler
author
Seungha Yang
<seungha.yang@navercorp.com>
Thu, 15 Aug 2019 08:49:12 +0000
(17:49 +0900)
committer
Tim-Philipp Müller
<tim@centricular.com>
Fri, 16 Aug 2019 15:14:23 +0000
(16:14 +0100)
... caused by null pointer dereference. The d3dvideosink object might
not available yet on the handler.
sys/d3dvideosink/d3dhelpers.c
patch
|
blob
|
history
diff --git
a/sys/d3dvideosink/d3dhelpers.c
b/sys/d3dvideosink/d3dhelpers.c
index
a145f53
..
f6a7b8d
100644
(file)
--- a/
sys/d3dvideosink/d3dhelpers.c
+++ b/
sys/d3dvideosink/d3dhelpers.c
@@
-2046,6
+2046,11
@@
d3d_wnd_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
WNDPROC proc;
LRESULT ret = 0;
+ /* d3dvideosink object might not available yet.
+ * The thread for message queue starts earlier than SetProp... */
+ if (!sink)
+ return DefWindowProc (hWnd, message, wParam, lParam);
+
LOCK_SINK (sink);
proc = sink->d3d.orig_wnd_proc;
UNLOCK_SINK (sink);