[FFmpeg-devel] [PATCH 4/5] avfilter/libplacebo: strip interlaced flag when deinterlacing

Niklas Haas ffmpeg at haasn.xyz
Sun Feb 16 17:58:54 EET 2025


From: Niklas Haas <git at haasn.dev>

---
 libavfilter/vf_libplacebo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 933b086b69..7dc275f565 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -859,6 +859,8 @@ static int output_frame(AVFilterContext *ctx, int64_t pts)
     out->color_range = outlink->color_range;
     if (s->fps.num)
         out->duration = 1;
+    if (s->deinterlace)
+        out->flags &= ~(AV_FRAME_FLAG_INTERLACED | AV_FRAME_FLAG_TOP_FIELD_FIRST);
 
     if (s->apply_dovi && av_frame_get_side_data(ref, AV_FRAME_DATA_DOVI_METADATA)) {
         /* Output of dovi reshaping is always BT.2020+PQ, so infer the correct
-- 
2.47.0



More information about the ffmpeg-devel mailing list