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
176ac987
Commit
176ac987
authored
Nov 20, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/f_graphmonitor: output frames in pts gaps
parent
a1f8b36c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
f_graphmonitor.c
libavfilter/f_graphmonitor.c
+10
-3
No files found.
libavfilter/f_graphmonitor.c
View file @
176ac987
...
...
@@ -42,6 +42,7 @@ typedef struct GraphMonitorContext {
AVRational
frame_rate
;
int64_t
pts
;
int64_t
next_pts
;
uint8_t
white
[
4
];
uint8_t
yellow
[
4
];
uint8_t
red
[
4
];
...
...
@@ -300,7 +301,7 @@ static int create_frame(AVFilterContext *ctx, int64_t pts)
}
out
->
pts
=
pts
;
s
->
pts
=
pts
;
s
->
pts
=
pts
+
1
;
return
ff_filter_frame
(
outlink
,
out
);
}
...
...
@@ -328,10 +329,14 @@ static int activate(AVFilterContext *ctx)
if
(
pts
!=
AV_NOPTS_VALUE
)
{
pts
=
av_rescale_q
(
pts
,
inlink
->
time_base
,
outlink
->
time_base
);
if
(
s
->
pts
<
pts
&&
ff_outlink_frame_wanted
(
outlink
))
return
create_frame
(
ctx
,
pts
);
if
(
s
->
pts
==
AV_NOPTS_VALUE
)
s
->
pts
=
pts
;
s
->
next_pts
=
pts
;
}
if
(
s
->
pts
<
s
->
next_pts
&&
ff_outlink_frame_wanted
(
outlink
))
return
create_frame
(
ctx
,
s
->
pts
);
FF_FILTER_FORWARD_STATUS
(
inlink
,
outlink
);
FF_FILTER_FORWARD_WANTED
(
outlink
,
inlink
);
...
...
@@ -347,6 +352,8 @@ static int config_output(AVFilterLink *outlink)
s
->
yellow
[
0
]
=
s
->
yellow
[
1
]
=
255
;
s
->
red
[
0
]
=
255
;
s
->
green
[
1
]
=
255
;
s
->
pts
=
AV_NOPTS_VALUE
;
s
->
next_pts
=
AV_NOPTS_VALUE
;
outlink
->
w
=
s
->
w
;
outlink
->
h
=
s
->
h
;
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
...
...
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