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
e166ec15
Commit
e166ec15
authored
Feb 11, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activex: take lock before accessing libvlc_playlist_items_count().
Patch by jan-paul dinger (jpd at m2x dot nl).
parent
b9b8bcc1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
include/vlc/deprecated.h
include/vlc/deprecated.h
+2
-0
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+9
-3
projects/activex/vlccontrol.cpp
projects/activex/vlccontrol.cpp
+2
-0
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+4
-0
No files found.
include/vlc/deprecated.h
View file @
e166ec15
...
@@ -173,6 +173,8 @@ VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
...
@@ -173,6 +173,8 @@ VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
/**
/**
* Get the number of items in the playlist
* Get the number of items in the playlist
*
*
* Expects the playlist instance to be locked already.
*
* \param p_instance the playlist instance
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
* \param p_e an initialized exception pointer
* \return the number of items
* \return the number of items
...
...
projects/activex/plugin.cpp
View file @
e166ec15
...
@@ -726,10 +726,16 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
...
@@ -726,10 +726,16 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
libvlc_video_set_parent
(
p_libvlc
,
libvlc_video_set_parent
(
p_libvlc
,
reinterpret_cast
<
libvlc_drawable_t
>
(
_inplacewnd
),
NULL
);
reinterpret_cast
<
libvlc_drawable_t
>
(
_inplacewnd
),
NULL
);
if
(
_b_autoplay
&
(
libvlc_playlist_items_count
(
p_libvlc
,
NULL
)
>
0
)
)
if
(
_b_autoplay
)
{
{
libvlc_playlist_play
(
p_libvlc
,
0
,
0
,
NULL
,
NULL
);
libvlc_playlist_lock
(
p_libvlc
);
fireOnPlayEvent
();
unsigned
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
if
(
count
>
0
)
{
libvlc_playlist_play
(
p_libvlc
,
0
,
0
,
NULL
,
NULL
);
fireOnPlayEvent
();
}
libvlc_playlist_unlock
(
p_libvlc
);
}
}
}
}
...
...
projects/activex/vlccontrol.cpp
View file @
e166ec15
...
@@ -939,7 +939,9 @@ STDMETHODIMP VLCControl::get_PlaylistCount(int *count)
...
@@ -939,7 +939,9 @@ STDMETHODIMP VLCControl::get_PlaylistCount(int *count)
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_playlist_lock
(
p_libvlc
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
libvlc_playlist_unlock
(
p_libvlc
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCControl
,
_p_instance
->
setErrorInfo
(
IID_IVLCControl
,
...
...
projects/activex/vlccontrol2.cpp
View file @
e166ec15
...
@@ -1526,7 +1526,9 @@ STDMETHODIMP VLCPlaylistItems::get_count(long* count)
...
@@ -1526,7 +1526,9 @@ STDMETHODIMP VLCPlaylistItems::get_count(long* count)
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_playlist_lock
(
p_libvlc
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
libvlc_playlist_unlock
(
p_libvlc
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylistItems
,
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylistItems
,
...
@@ -1676,7 +1678,9 @@ STDMETHODIMP VLCPlaylist::get_itemCount(long* count)
...
@@ -1676,7 +1678,9 @@ STDMETHODIMP VLCPlaylist::get_itemCount(long* count)
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_playlist_lock
(
p_libvlc
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
libvlc_playlist_unlock
(
p_libvlc
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
...
...
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