diff mbox series

[FFmpeg-devel,09/11] avfilter/vf_coreimage: silence AVFrame deprecation warnings

Message ID D2NQZKJWIYNK.3P7MP7KHM8D07@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/11] avdevice/audiotoolbox: fix mixed declaration and code | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz July 12, 2024, 5:30 p.m. UTC
Deprecation warning need to be disabled here as we set deprecated
fields.
---
 libavfilter/vf_coreimage.m | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m
index 38355414bd..45b16cc48a 100644
--- a/libavfilter/vf_coreimage.m
+++ b/libavfilter/vf_coreimage.m
@@ -296,14 +296,18 @@  static int request_frame(AVFilterLink *link)
 
     frame->pts                 = ctx->pts;
     frame->duration            = 1;
+    frame->flags              |= AV_FRAME_FLAG_KEY;
+    frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
+
+FF_DISABLE_DEPRECATION_WARNINGS
 #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;
 #endif
-    frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
+FF_ENABLE_DEPRECATION_WARNINGS
+
     frame->pict_type           = AV_PICTURE_TYPE_I;
     frame->sample_aspect_ratio = ctx->sar;