Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c2696391
Commit
c2696391
authored
Feb 17, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mozilla: protect calls to libvlc_playlist_isplaying()
parent
e2ce5890
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/control/npolibvlc.cpp
+2
-0
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+4
-0
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+12
-2
No files found.
projects/mozilla/control/npolibvlc.cpp
View file @
c2696391
...
...
@@ -1349,7 +1349,9 @@ RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::getProperty(int index, NPV
}
case
ID_playlist_isplaying
:
{
libvlc_playlist_lock
(
p_plugin
->
getVLC
());
int
val
=
libvlc_playlist_isplaying
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_playlist_unlock
(
p_plugin
->
getVLC
());
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
...
...
projects/mozilla/vlcplugin.cpp
View file @
c2696391
...
...
@@ -583,7 +583,9 @@ void VlcPlugin::redrawToolbar()
if
(
p_md
)
{
/* get isplaying */
libvlc_playlist_lock
(
getVLC
()
);
is_playing
=
libvlc_playlist_isplaying
(
getVLC
(),
&
ex
);
libvlc_playlist_unlock
(
getVLC
()
);
libvlc_exception_clear
(
&
ex
);
/* get movie position in % */
...
...
@@ -696,7 +698,9 @@ vlc_toolbar_clicked_t VlcPlugin::getToolbarButtonClicked( int i_xpos, int i_ypos
/* get isplaying */
libvlc_exception_init
(
&
ex
);
libvlc_playlist_lock
(
getVLC
()
);
is_playing
=
libvlc_playlist_isplaying
(
getVLC
(),
&
ex
);
libvlc_playlist_unlock
(
getVLC
()
);
libvlc_exception_clear
(
&
ex
);
/* get mute info */
...
...
projects/mozilla/vlcshell.cpp
View file @
c2696391
...
...
@@ -184,7 +184,11 @@ int16 NPP_HandleEvent( NPP instance, void * event )
libvlc_instance_t
*
p_vlc
=
p_plugin
->
getVLC
();
if
(
p_vlc
)
{
if
(
libvlc_playlist_isplaying
(
p_vlc
,
NULL
)
)
int
is_playing
;
libvlc_playlist_lock
(
p_vlc
);
is_playing
=
libvlc_playlist_isplaying
(
p_vlc
,
NULL
);
libvlc_playlist_lunock
(
p_vlc
);
if
(
is_playing
)
{
libvlc_media_player_t
*
p_md
=
libvlc_playlist_get_media_player
(
p_vlc
,
NULL
);
...
...
@@ -215,7 +219,11 @@ int16 NPP_HandleEvent( NPP instance, void * event )
if
(
p_vlc
)
{
if
(
libvlc_playlist_isplaying
(
p_vlc
,
NULL
)
)
int
is_playing
;
libvlc_playlist_lock
(
p_vlc
);
is_playing
=
libvlc_playlist_isplaying
(
p_vlc
,
NULL
);
libvlc_playlist_unlock
(
p_vlc
);
if
(
is_playing
)
{
libvlc_media_player_t
*
p_md
=
libvlc_playlist_get_media_player
(
p_vlc
,
NULL
);
...
...
@@ -846,7 +854,9 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
fprintf
(
stderr
,
"%s
\n
"
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_playlist_lock
(
p_plugin
->
getVLC
()
);
i_playing
=
libvlc_playlist_isplaying
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_playlist_unlock
(
p_plugin
->
getVLC
()
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"%s
\n
"
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
...
...
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