aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-05-10 12:19:58 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-22 17:10:44 +0200
commit113250732723f1a2b695c64cdc03e5bf0f1311a4 (patch)
treea8523ec0adfc354e97af3c4c930e50319ac92665
parent14b9946967a3141768554fcc970ec423a708744a (diff)
downloadffmpeg-113250732723f1a2b695c64cdc03e5bf0f1311a4.tar.gz
fftools/ffmpeg_filter: make sure pkt_duration matches duration
Otherwise the two values might get desynchronized and lavfi can prefer the wrong one.
-rw-r--r--fftools/ffmpeg_filter.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 95ffa0f087..274eefe11c 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1622,6 +1622,11 @@ int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_reference)
frame->pts = av_rescale_q(frame->pts, frame->time_base, ifp->time_base);
frame->duration = av_rescale_q(frame->duration, frame->time_base, ifp->time_base);
frame->time_base = ifp->time_base;
+#if LIBAVUTIL_VERSION_MAJOR < 59
+ AV_NOWARN_DEPRECATED(
+ frame->pkt_duration = frame->duration;
+ )
+#endif
ret = av_buffersrc_add_frame_flags(ifilter->filter, frame,
AV_BUFFERSRC_FLAG_PUSH);