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
e2df680a
Commit
e2df680a
authored
Mar 11, 2016
by
Hugo Beauzée-Luyssen
Browse files
VLCThumbnailer: Unregister events once we know the playback has started
parent
800285a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/metadata_services/vlc/VLCThumbnailer.cpp
View file @
e2df680a
...
...
@@ -139,11 +139,13 @@ parser::Task::Status VLCThumbnailer::run( parser::Task& task )
parser
::
Task
::
Status
VLCThumbnailer
::
startPlayback
(
VLC
::
MediaPlayer
&
mp
)
{
mp
.
eventManager
().
onPlaying
([
this
]()
{
// Use a copy of the event manager to automatically unregister all events as soon
// as we leave this method.
auto
em
=
mp
.
eventManager
();
em
.
onPlaying
([
this
]()
{
m_cond
.
notify_all
();
});
m
p
.
eventManager
()
.
onEncounteredError
([
this
]()
{
e
m
.
onEncounteredError
([
this
]()
{
m_cond
.
notify_all
();
});
std
::
unique_lock
<
std
::
mutex
>
lock
(
m_mutex
);
...
...
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