Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c6245fff
Commit
c6245fff
authored
Jan 23, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup condition handling, should fix #1448
parent
78964d87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
modules/misc/audioscrobbler.c
modules/misc/audioscrobbler.c
+16
-12
No files found.
modules/misc/audioscrobbler.c
View file @
c6245fff
...
...
@@ -263,28 +263,32 @@ static void Run( intf_thread_t *p_intf )
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
/* main loop */
while
(
!
intf_ShouldDie
(
p_intf
)
)
for
(
;;
)
{
vlc_bool_t
b_die
;
vlc_bool_t
b_die
=
VLC_FALSE
,
b_wait
=
VLC_FALSE
;
/* waiting for data to submit, if waiting interval is elapsed */
if
(
mdate
()
<
p_sys
->
next_exchange
)
vlc_object_lock
(
p_intf
);
if
(
vlc_object_alive
(
p_intf
)
)
{
vlc_object_lock
(
p_intf
);
b_die
=
(
vlc_object_timedwait
(
p_intf
,
p_sys
->
next_exchange
)
<
0
);
vlc_object_unlock
(
p_intf
);
if
(
mdate
()
<
p_sys
->
next_exchange
)
/* wait until we can resubmit, i.e. */
b_wait
=
!
vlc_object_timedwait
(
p_intf
,
p_sys
->
next_exchange
);
else
/* wait for data to submit */
/* we are signaled each time there is a song to submit */
vlc_object_wait
(
p_intf
);
}
else
b_die
=
vlc_object_lock_and_wait
(
p_intf
);
b_die
=
!
vlc_object_alive
(
p_intf
);
vlc_object_unlock
(
p_intf
);
if
(
b_die
)
{
msg_Dbg
(
p_intf
,
"audioscrobbler is dying"
);
return
;
}
/* we are signaled each time there is a song to submit */
else
if
(
mdate
()
<
p_sys
->
next_exchange
)
continue
;
if
(
b_wait
)
continue
;
/* holding on until next_exchange */
/* handshake if needed */
if
(
p_sys
->
b_handshaked
==
VLC_FALSE
)
...
...
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