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
0a7e31db
Commit
0a7e31db
authored
Jul 10, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot: remove redundant deadline check
vlc_cond_timedwait() returns non-zero when the deadline is reached.
parent
a7ed2929
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/video_output/snapshot.c
src/video_output/snapshot.c
+4
-3
No files found.
src/video_output/snapshot.c
View file @
0a7e31db
...
...
@@ -78,15 +78,16 @@ void vout_snapshot_End(vout_snapshot_t *snap)
/* */
picture_t
*
vout_snapshot_Get
(
vout_snapshot_t
*
snap
,
mtime_t
timeout
)
{
const
mtime_t
deadline
=
mdate
()
+
timeout
;
vlc_mutex_lock
(
&
snap
->
lock
);
/* */
snap
->
request_count
++
;
/* */
const
mtime_t
deadline
=
mdate
()
+
timeout
;
while
(
snap
->
is_available
&&
!
snap
->
picture
&&
mdate
()
<
deadline
)
vlc_cond_timedwait
(
&
snap
->
wait
,
&
snap
->
lock
,
deadline
);
while
(
snap
->
is_available
&&
!
snap
->
picture
&&
vlc_cond_timedwait
(
&
snap
->
wait
,
&
snap
->
lock
,
deadline
)
==
0
);
/* */
picture_t
*
picture
=
snap
->
picture
;
...
...
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