diff mbox series

[FFmpeg-devel,1/9] lavfi/yadif: update output frame durations

Message ID 20231001125552.23976-1-anton@khirnov.net
State Accepted
Commit 63bc6430a67ad9409093c1e613f5120e72c39985
Headers show
Series [FFmpeg-devel,1/9] lavfi/yadif: update output frame durations | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Oct. 1, 2023, 12:55 p.m. UTC
---
 libavfilter/yadif_common.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/libavfilter/yadif_common.c b/libavfilter/yadif_common.c
index b26989f574..21097011f5 100644
--- a/libavfilter/yadif_common.c
+++ b/libavfilter/yadif_common.c
@@ -151,6 +151,7 @@  int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
         av_frame_free(&yadif->prev);
         if (yadif->out->pts != AV_NOPTS_VALUE)
             yadif->out->pts *= 2;
+        yadif->out->duration *= 2;
         return ff_filter_frame(ctx->outputs[0], yadif->out);
     }
 
@@ -168,6 +169,8 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
     if (yadif->out->pts != AV_NOPTS_VALUE)
         yadif->out->pts *= 2;
+    if (!(yadif->mode & 1))
+        yadif->out->duration *= 2;
 
     return return_frame(ctx, 0);
 }