Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8f17a8ef
Commit
8f17a8ef
authored
Oct 18, 2011
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: consider estimated time of filter in early frame drop
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
223cba6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
ffplay.c
ffplay.c
+10
-1
No files found.
ffplay.c
View file @
8f17a8ef
...
...
@@ -198,6 +198,8 @@ typedef struct VideoState {
double
frame_last_pts
;
double
frame_last_duration
;
double
frame_last_dropped_pts
;
double
frame_last_returned_time
;
double
frame_last_filter_delay
;
int64_t
frame_last_dropped_pos
;
double
video_clock
;
///<pts of last decoded frame / predicted pts of next decoded frame
int
video_stream
;
...
...
@@ -1499,7 +1501,7 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
double
ptsdiff
=
dpts
-
is
->
frame_last_pts
;
if
(
fabs
(
clockdiff
)
<
AV_NOSYNC_THRESHOLD
&&
ptsdiff
>
0
&&
ptsdiff
<
AV_NOSYNC_THRESHOLD
&&
clockdiff
+
ptsdiff
<
0
)
{
//TODO: Substract approxiamte time of filter
clockdiff
+
ptsdiff
-
is
->
frame_last_filter_delay
<
0
)
{
is
->
frame_last_dropped_pos
=
pkt
->
pos
;
is
->
frame_last_dropped_pts
=
dpts
;
ret
=
0
;
...
...
@@ -1508,6 +1510,9 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
SDL_UnlockMutex
(
is
->
pictq_mutex
);
}
if
(
ret
)
is
->
frame_last_returned_time
=
av_gettime
()
/
1000000
.
0
;
return
ret
;
}
return
0
;
...
...
@@ -1832,6 +1837,10 @@ static int video_thread(void *arg)
if
(
ret
<
0
)
goto
the_end
;
is
->
frame_last_filter_delay
=
av_gettime
()
/
1000000
.
0
-
is
->
frame_last_returned_time
;
if
(
fabs
(
is
->
frame_last_filter_delay
)
>
AV_NOSYNC_THRESHOLD
/
10
.
0
)
is
->
frame_last_filter_delay
=
0
;
#if CONFIG_AVFILTER
if
(
!
picref
)
continue
;
...
...
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