Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
af8db910
Commit
af8db910
authored
Apr 12, 2023
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: use the new AVFrame key_frame flag in all filters
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
dc7bd7c5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
5 deletions
+11
-5
avfilter.c
libavfilter/avfilter.c
+1
-1
buffersrc.c
libavfilter/buffersrc.c
+3
-0
f_select.c
libavfilter/f_select.c
+2
-2
vf_blackframe.c
libavfilter/vf_blackframe.c
+1
-1
vf_coreimage.m
libavfilter/vf_coreimage.m
+1
-0
vf_showinfo.c
libavfilter/vf_showinfo.c
+1
-1
vsrc_gradients.c
libavfilter/vsrc_gradients.c
+1
-0
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+1
-0
No files found.
libavfilter/avfilter.c
View file @
af8db910
...
...
@@ -59,7 +59,7 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end)
ref
->
width
,
ref
->
height
,
!
(
ref
->
flags
&
AV_FRAME_FLAG_INTERLACED
)
?
'P'
:
/* Progressive */
(
ref
->
flags
&
AV_FRAME_FLAG_TOP_FIELD_FIRST
)
?
'T'
:
'B'
,
/* Top / Bottom */
ref
->
key_frame
,
!!
(
ref
->
flags
&
AV_FRAME_FLAG_KEY
)
,
av_get_picture_type_char
(
ref
->
pict_type
));
}
if
(
ref
->
nb_samples
)
{
...
...
libavfilter/buffersrc.c
View file @
af8db910
...
...
@@ -256,6 +256,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
if
(
copy
->
key_frame
)
copy
->
flags
|=
AV_FRAME_FLAG_KEY
;
ret
=
ff_filter_frame
(
ctx
->
outputs
[
0
],
copy
);
if
(
ret
<
0
)
return
ret
;
...
...
libavfilter/f_select.c
View file @
af8db910
...
...
@@ -346,7 +346,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
select
->
var_values
[
VAR_POS
]
=
frame
->
pkt_pos
==
-
1
?
NAN
:
frame
->
pkt_pos
;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
select
->
var_values
[
VAR_KEY
]
=
frame
->
key_frame
;
select
->
var_values
[
VAR_KEY
]
=
!!
(
frame
->
flags
&
AV_FRAME_FLAG_KEY
)
;
select
->
var_values
[
VAR_CONCATDEC_SELECT
]
=
get_concatdec_select
(
frame
,
av_rescale_q
(
frame
->
pts
,
inlink
->
time_base
,
AV_TIME_BASE_Q
));
switch
(
inlink
->
type
)
{
...
...
@@ -375,7 +375,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
select
->
var_values
[
VAR_N
],
select
->
var_values
[
VAR_PTS
],
select
->
var_values
[
VAR_T
],
frame
->
key_frame
);
!!
(
frame
->
flags
&
AV_FRAME_FLAG_KEY
)
);
switch
(
inlink
->
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
...
...
libavfilter/vf_blackframe.c
View file @
af8db910
...
...
@@ -72,7 +72,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
p
+=
frame
->
linesize
[
0
];
}
if
(
frame
->
key_frame
)
if
(
frame
->
flags
&
AV_FRAME_FLAG_KEY
)
s
->
last_keyframe
=
s
->
frame
;
pblack
=
s
->
nblack
*
100
/
(
inlink
->
w
*
inlink
->
h
);
...
...
libavfilter/vf_coreimage.m
View file @
af8db910
...
...
@@ -302,6 +302,7 @@ static int request_frame(AVFilterLink *link)
frame
->
pts
=
ctx
->
pts
;
frame
->
duration
=
1
;
frame
->
key_frame
=
1
;
frame
->
flags
|=
AV_FRAME_FLAG_KEY
#if FF_API_INTERLACED_FRAME
frame
->
interlaced_frame
=
0
;
#endif
...
...
libavfilter/vf_showinfo.c
View file @
af8db910
...
...
@@ -724,7 +724,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
frame
->
width
,
frame
->
height
,
!
(
frame
->
flags
&
AV_FRAME_FLAG_INTERLACED
)
?
'P'
:
/* Progressive */
(
frame
->
flags
&
AV_FRAME_FLAG_TOP_FIELD_FIRST
)
?
'T'
:
'B'
,
/* Top / Bottom */
frame
->
key_frame
,
!!
(
frame
->
flags
&
AV_FRAME_FLAG_KEY
)
,
av_get_picture_type_char
(
frame
->
pict_type
));
if
(
s
->
calculate_checksums
)
{
...
...
libavfilter/vsrc_gradients.c
View file @
af8db910
...
...
@@ -398,6 +398,7 @@ static int activate(AVFilterContext *ctx)
return
AVERROR
(
ENOMEM
);
frame
->
key_frame
=
1
;
frame
->
flags
|=
AV_FRAME_FLAG_KEY
;
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
frame
->
interlaced_frame
=
0
;
...
...
libavfilter/vsrc_testsrc.c
View file @
af8db910
...
...
@@ -185,6 +185,7 @@ static int activate(AVFilterContext *ctx)
frame
->
pts
=
test
->
pts
;
frame
->
duration
=
1
;
frame
->
key_frame
=
1
;
frame
->
flags
|=
AV_FRAME_FLAG_KEY
;
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
frame
->
interlaced_frame
=
0
;
...
...
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