Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
d5ff0152
Commit
d5ff0152
authored
Aug 19, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ThreadDisplayPreparePicture: simplify
parent
6cf55f06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
src/video_output/video_output.c
src/video_output/video_output.c
+15
-15
No files found.
src/video_output/video_output.c
View file @
d5ff0152
...
...
@@ -816,7 +816,6 @@ static void ThreadChangeFilters(vout_thread_t *vout,
/* */
static
int
ThreadDisplayPreparePicture
(
vout_thread_t
*
vout
,
bool
reuse
,
bool
frame_by_frame
)
{
int
lost_count
=
0
;
bool
is_late_dropped
=
vout
->
p
->
is_late_dropped
&&
!
vout
->
p
->
pause
.
is_on
&&
!
frame_by_frame
;
vlc_mutex_lock
(
&
vout
->
p
->
filter
.
lock
);
...
...
@@ -830,22 +829,24 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra
decoded
=
picture_Hold
(
vout
->
p
->
displayed
.
decoded
);
}
else
{
decoded
=
picture_fifo_Pop
(
vout
->
p
->
decoder_fifo
);
if
(
is_late_dropped
&&
decoded
&&
!
decoded
->
b_force
)
{
const
mtime_t
predicted
=
mdate
()
+
0
;
/* TODO improve */
const
mtime_t
late
=
predicted
-
decoded
->
date
;
if
(
late
>
VOUT_DISPLAY_LATE_THRESHOLD
)
{
msg_Warn
(
vout
,
"picture is too late to be displayed (missing %d ms)"
,
(
int
)(
late
/
1000
));
picture_Release
(
decoded
);
lost_count
++
;
continue
;
}
else
if
(
late
>
0
)
{
msg_Dbg
(
vout
,
"picture might be displayed late (missing %d ms)"
,
(
int
)(
late
/
1000
));
if
(
decoded
)
{
if
(
is_late_dropped
&&
!
decoded
->
b_force
)
{
const
mtime_t
predicted
=
mdate
()
+
0
;
/* TODO improve */
const
mtime_t
late
=
predicted
-
decoded
->
date
;
if
(
late
>
VOUT_DISPLAY_LATE_THRESHOLD
)
{
msg_Warn
(
vout
,
"picture is too late to be displayed (missing %"
PRId64
" ms)"
,
late
/
1000
);
picture_Release
(
decoded
);
vout_statistic_AddLost
(
&
vout
->
p
->
statistic
,
1
);
continue
;
}
else
if
(
late
>
0
)
{
msg_Dbg
(
vout
,
"picture might be displayed late (missing %"
PRId64
" ms)"
,
late
/
1000
);
}
}
if
(
!
VideoFormatIsCropArEqual
(
&
decoded
->
format
,
&
vout
->
p
->
filter
.
format
))
ThreadChangeFilters
(
vout
,
&
decoded
->
format
,
vout
->
p
->
filter
.
configuration
,
true
);
}
if
(
decoded
&&
!
VideoFormatIsCropArEqual
(
&
decoded
->
format
,
&
vout
->
p
->
filter
.
format
))
ThreadChangeFilters
(
vout
,
&
decoded
->
format
,
vout
->
p
->
filter
.
configuration
,
true
);
}
if
(
!
decoded
)
break
;
reuse
=
false
;
...
...
@@ -862,7 +863,6 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra
vlc_mutex_unlock
(
&
vout
->
p
->
filter
.
lock
);
vout_statistic_AddLost
(
&
vout
->
p
->
statistic
,
lost_count
);
if
(
!
picture
)
return
VLC_EGENERIC
;
...
...
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