Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
09546e4b
Commit
09546e4b
authored
Feb 24, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activex: protect calls to libvlc_playlist_isplaying().
parent
4025fe2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
projects/activex/vlccontrol.cpp
projects/activex/vlccontrol.cpp
+7
-1
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+3
-0
No files found.
projects/activex/vlccontrol.cpp
View file @
09546e4b
...
...
@@ -203,10 +203,12 @@ STDMETHODIMP VLCControl::get_Playing(VARIANT_BOOL *isPlaying)
result
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
result
)
)
{
libvlc_playlist_lock
(
p_libvlc
);
if
(
libvlc_playlist_isplaying
(
p_libvlc
,
NULL
)
)
*
isPlaying
=
VARIANT_TRUE
;
else
*
isPlaying
=
VARIANT_FALSE
;
libvlc_playlist_unlock
(
p_libvlc
);
return
NOERROR
;
}
}
...
...
@@ -354,7 +356,11 @@ STDMETHODIMP VLCControl::fullscreen(void)
result
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
result
)
)
{
if
(
libvlc_playlist_isplaying
(
p_libvlc
,
NULL
)
)
bool
b_playing
;
libvlc_playlist_lock
(
p_libvlc
);
b_playing
=
libvlc_playlist_isplaying
(
p_libvlc
,
NULL
);
libvlc_playlist_unlock
(
p_libvlc
);
if
(
b_playing
)
{
libvlc_media_player_t
*
p_md
=
libvlc_playlist_get_media_player
(
p_libvlc
,
NULL
);
...
...
projects/activex/vlccontrol2.cpp
View file @
09546e4b
...
...
@@ -1706,15 +1706,18 @@ STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_playlist_lock
(
p_libvlc
);
*
isPlaying
=
libvlc_playlist_isplaying
(
p_libvlc
,
&
ex
)
?
VARIANT_TRUE:
VARIANT_FALSE
;
if
(
libvlc_exception_raised
(
&
ex
)
)
{
libvlc_playlist_unlock
(
p_libvlc
);
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
libvlc_playlist_unlock
(
p_libvlc
);
return
NOERROR
;
}
return
hr
;
...
...
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