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
308188be
Commit
308188be
authored
May 22, 2014
by
Billy Shambrook
Committed by
Michael Niedermayer
May 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add metadata injection to blackdetect
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9722a6a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
vf_blackdetect.c
libavfilter/vf_blackdetect.c
+5
-0
No files found.
libavfilter/vf_blackdetect.c
View file @
308188be
...
...
@@ -134,6 +134,7 @@ static int request_frame(AVFilterLink *outlink)
return
ret
;
}
// TODO: document metadata
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
picref
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
...
...
@@ -161,12 +162,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
/* black starts here */
blackdetect
->
black_started
=
1
;
blackdetect
->
black_start
=
picref
->
pts
;
av_dict_set
(
avpriv_frame_get_metadatap
(
picref
),
"lavfi.black_start"
,
av_ts2timestr
(
blackdetect
->
black_start
,
&
inlink
->
time_base
),
0
);
}
}
else
if
(
blackdetect
->
black_started
)
{
/* black ends here */
blackdetect
->
black_started
=
0
;
blackdetect
->
black_end
=
picref
->
pts
;
check_black_end
(
ctx
);
av_dict_set
(
avpriv_frame_get_metadatap
(
picref
),
"lavfi.black_end"
,
av_ts2timestr
(
blackdetect
->
black_end
,
&
inlink
->
time_base
),
0
);
}
blackdetect
->
last_picref_pts
=
picref
->
pts
;
...
...
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