aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/buffersrc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-07-11 10:31:47 +0200
committerAnton Khirnov <anton@khirnov.net>2022-07-19 12:27:17 +0200
commit357ba45a5ca3864b0eba07747ab6ea1614f2646b (patch)
treebfc0cb60694b7e44535d29aa21413f506ad8b149 /libavfilter/buffersrc.c
parentac2cda4296dbbaf2580ec3aa404bb2f3a393159c (diff)
downloadffmpeg-357ba45a5ca3864b0eba07747ab6ea1614f2646b.tar.gz
lavfi: use AVFrame.duration instead of AVFrame.pkt_duration
Diffstat (limited to 'libavfilter/buffersrc.c')
-rw-r--r--libavfilter/buffersrc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index a3190468bb..ae8bba19b0 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -243,6 +243,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
+#if FF_API_PKT_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (copy->pkt_duration && copy->pkt_duration != copy->duration)
+ copy->duration = copy->pkt_duration;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
ret = ff_filter_frame(ctx->outputs[0], copy);
if (ret < 0)
return ret;