aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-12 20:07:01 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 19:20:03 -0300
commit3e06f6f04020bef32fa42bc9d7f96e76a46453aa (patch)
tree3cb4509342f7f7fcbc5c0cf20faf4fc3f90202e8 /libavfilter
parentc7a8681860d68f3ad00ef49215dbfda52c71c90b (diff)
downloadffmpeg-3e06f6f04020bef32fa42bc9d7f96e76a46453aa.tar.gz
avutil/frame: deprecate key_frame
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/buffersrc.c4
-rw-r--r--libavfilter/vf_coreimage.m2
-rw-r--r--libavfilter/vsrc_gradients.c5
-rw-r--r--libavfilter/vsrc_testsrc.c4
4 files changed, 15 insertions, 0 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 8d5a08995b..612541b803 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -256,8 +256,12 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
+#if FF_API_FRAME_KEY
+FF_DISABLE_DEPRECATION_WARNINGS
if (copy->key_frame)
copy->flags |= AV_FRAME_FLAG_KEY;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
ret = ff_filter_frame(ctx->outputs[0], copy);
if (ret < 0)
diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m
index aa0c90f537..41750bfb7e 100644
--- a/libavfilter/vf_coreimage.m
+++ b/libavfilter/vf_coreimage.m
@@ -301,7 +301,9 @@ static int request_frame(AVFilterLink *link)
frame->pts = ctx->pts;
frame->duration = 1;
+#if FF_API_FRAME_KEY
frame->key_frame = 1;
+#endif
frame->flags |= AV_FRAME_FLAG_KEY
#if FF_API_INTERLACED_FRAME
frame->interlaced_frame = 0;
diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c
index bc2cfb024c..98c38f8551 100644
--- a/libavfilter/vsrc_gradients.c
+++ b/libavfilter/vsrc_gradients.c
@@ -397,7 +397,12 @@ static int activate(AVFilterContext *ctx)
if (!frame)
return AVERROR(ENOMEM);
+#if FF_API_FRAME_KEY
+FF_DISABLE_DEPRECATION_WARNINGS
frame->key_frame = 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
frame->flags |= AV_FRAME_FLAG_KEY;
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index d4037c6da8..f391ac02e0 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -184,7 +184,11 @@ static int activate(AVFilterContext *ctx)
return AVERROR(ENOMEM);
frame->pts = test->pts;
frame->duration = 1;
+#if FF_API_PKT_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
frame->key_frame = 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
frame->flags |= AV_FRAME_FLAG_KEY;
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS