Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
9aa773ce
Commit
9aa773ce
authored
Sep 01, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- vlcshell.cpp: fix for a couple of crashing scenarios
parent
7e54e24b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
mozilla/control/npovlc.cpp
mozilla/control/npovlc.cpp
+6
-2
mozilla/vlcshell.cpp
mozilla/vlcshell.cpp
+13
-3
No files found.
mozilla/control/npovlc.cpp
View file @
9aa773ce
...
@@ -630,7 +630,12 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -630,7 +630,12 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
p_input
)
if
(
p_input
)
{
{
vlc_int64_t
pos
=
numberValue
(
args
[
0
])
*
1000LL
;
vlc_int64_t
pos
=
0
;
if
(
NPVARIANT_IS_INT32
(
args
[
0
])
)
pos
=
(
vlc_int64_t
)
NPVARIANT_TO_INT32
(
args
[
0
]);
else
pos
=
(
vlc_int64_t
)
NPVARIANT_TO_DOUBLE
(
args
[
0
]);
if
(
NPVARIANT_TO_BOOLEAN
(
args
[
1
])
)
if
(
NPVARIANT_TO_BOOLEAN
(
args
[
1
])
)
{
{
/* relative seek */
/* relative seek */
...
@@ -649,7 +654,6 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -649,7 +654,6 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
libvlc_input_free
(
p_input
);
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
...
...
mozilla/vlcshell.cpp
View file @
9aa773ce
...
@@ -276,6 +276,16 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
...
@@ -276,6 +276,16 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
VlcPlugin
*
p_plugin
=
reinterpret_cast
<
VlcPlugin
*>
(
instance
->
pdata
);
VlcPlugin
*
p_plugin
=
reinterpret_cast
<
VlcPlugin
*>
(
instance
->
pdata
);
#if XP_WIN
HWND
win
=
(
HWND
)
p_plugin
->
getWindow
()
->
window
;
WNDPROC
winproc
=
p_plugin
->
getWindowProc
();
if
(
winproc
)
{
/* reset WNDPROC */
SetWindowLong
(
win
,
GWL_WNDPROC
,
(
LONG
)
winproc
);
}
#endif
if
(
p_plugin
)
if
(
p_plugin
)
delete
p_plugin
;
delete
p_plugin
;
...
@@ -361,13 +371,13 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
...
@@ -361,13 +371,13 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
/* reset WNDPROC */
/* reset WNDPROC */
SetWindowLong
(
oldwin
,
GWL_WNDPROC
,
(
LONG
)
oldproc
);
SetWindowLong
(
oldwin
,
GWL_WNDPROC
,
(
LONG
)
oldproc
);
}
}
/* attach our plugin object */
SetWindowLongPtr
((
HWND
)
drawable
,
GWLP_USERDATA
,
reinterpret_cast
<
LONG_PTR
>
(
p_plugin
));
/* install our WNDPROC */
/* install our WNDPROC */
p_plugin
->
setWindowProc
(
(
WNDPROC
)
SetWindowLong
(
drawable
,
p_plugin
->
setWindowProc
(
(
WNDPROC
)
SetWindowLong
(
drawable
,
GWL_WNDPROC
,
(
LONG
)
Manage
)
);
GWL_WNDPROC
,
(
LONG
)
Manage
)
);
/* attach our plugin object */
SetWindowLongPtr
((
HWND
)
drawable
,
GWLP_USERDATA
,
reinterpret_cast
<
LONG_PTR
>
(
p_plugin
));
/* change window style to our liking */
/* change window style to our liking */
LONG
style
=
GetWindowLong
((
HWND
)
drawable
,
GWL_STYLE
);
LONG
style
=
GetWindowLong
((
HWND
)
drawable
,
GWL_STYLE
);
style
|=
WS_CLIPCHILDREN
|
WS_CLIPSIBLINGS
;
style
|=
WS_CLIPCHILDREN
|
WS_CLIPSIBLINGS
;
...
...
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