Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
d9aa5ddb
Commit
d9aa5ddb
authored
Nov 29, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mozilla/vlcshell.cpp: nasty hack on win32 to avoid a deadlock on plugin destruction.
parent
f8adde04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
mozilla/vlcshell.cpp
mozilla/vlcshell.cpp
+34
-0
No files found.
mozilla/vlcshell.cpp
View file @
d9aa5ddb
...
...
@@ -414,6 +414,37 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
return
NPERR_NO_ERROR
;
}
#ifdef XP_WIN
/* This is really ugly but there is a deadlock when stopping a stream
* (in VLC_CleanUp()) because the video output is a child of the drawable but
* is in a different thread. */
static
void
HackStopVout
(
VlcPlugin
*
p_plugin
)
{
MSG
msg
;
HWND
hwnd
;
vlc_value_t
value
;
VLC_VariableGet
(
p_plugin
->
i_vlc
,
"drawable"
,
&
value
);
hwnd
=
FindWindowEx
(
(
HWND
)
value
.
i_int
,
0
,
0
,
0
);
if
(
!
hwnd
)
return
;
PostMessage
(
hwnd
,
WM_CLOSE
,
0
,
0
);
do
{
fprintf
(
stderr
,
"FindWindow: %p
\n
"
,
hwnd
);
while
(
PeekMessage
(
&
msg
,
(
HWND
)
value
.
i_int
,
0
,
0
,
PM_REMOVE
)
)
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
if
(
FindWindowEx
(
(
HWND
)
value
.
i_int
,
0
,
0
,
0
)
)
Sleep
(
10
);
}
while
(
(
hwnd
=
FindWindowEx
(
(
HWND
)
value
.
i_int
,
0
,
0
,
0
))
);
}
#endif
NPError
NPP_Destroy
(
NPP
instance
,
NPSavedData
**
save
)
{
if
(
instance
==
NULL
)
...
...
@@ -428,6 +459,9 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
if
(
p_plugin
->
i_vlc
)
{
#if USE_LIBVLC
# ifdef XP_WIN
HackStopVout
(
p_plugin
);
# endif
VLC_CleanUp
(
p_plugin
->
i_vlc
);
VLC_Destroy
(
p_plugin
->
i_vlc
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment