Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
93018e76
Commit
93018e76
authored
Mar 11, 2016
by
Hugo Beauzée-Luyssen
Browse files
VLCThumbnailer: Fix race condition
parent
6a5c7191
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/metadata_services/vlc/VLCThumbnailer.cpp
View file @
93018e76
...
...
@@ -146,8 +146,8 @@ parser::Task::Status VLCThumbnailer::startPlayback( VLC::MediaPlayer &mp )
mp
.
eventManager
().
onEncounteredError
([
this
]()
{
m_cond
.
notify_all
();
});
mp
.
play
();
std
::
unique_lock
<
std
::
mutex
>
lock
(
m_mutex
);
mp
.
play
();
bool
success
=
m_cond
.
wait_for
(
lock
,
std
::
chrono
::
seconds
(
3
),
[
&
mp
]()
{
auto
s
=
mp
.
state
();
return
s
==
libvlc_Playing
||
s
==
libvlc_Error
||
s
==
libvlc_Ended
;
...
...
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