[FFmpeg-cvslog] avfilter/vf_swaprect: add support for commands

Paul B Mahol git at videolan.org
Tue Feb 9 12:39:38 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Feb  9 11:38:37 2021 +0100| [73ff84c3d4fba6746f456ea9dd8fb7b138b245b7] | committer: Paul B Mahol

avfilter/vf_swaprect: add support for commands

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73ff84c3d4fba6746f456ea9dd8fb7b138b245b7
---

 doc/filters.texi          | 4 ++++
 libavfilter/vf_swaprect.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 0db014c922..aeb20bc955 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -19168,6 +19168,10 @@ The timestamp expressed in seconds. It's NAN if the input timestamp is unknown.
 the position in the file of the input frame, NAN if unknown
 @end table
 
+ at subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section swapuv
 Swap U & V plane.
 
diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
index cf9c298f2f..66bed161f4 100644
--- a/libavfilter/vf_swaprect.c
+++ b/libavfilter/vf_swaprect.c
@@ -43,7 +43,7 @@ typedef struct SwapRectContext {
 } SwapRectContext;
 
 #define OFFSET(x) offsetof(SwapRectContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 static const AVOption swaprect_options[] = {
     { "w",  "set rect width",                     OFFSET(w),  AV_OPT_TYPE_STRING, {.str="w/2"}, 0, 0, .flags = FLAGS },
     { "h",  "set rect height",                    OFFSET(h),  AV_OPT_TYPE_STRING, {.str="h/2"}, 0, 0, .flags = FLAGS },
@@ -253,4 +253,5 @@ AVFilter ff_vf_swaprect = {
     .inputs        = inputs,
     .outputs       = outputs,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
+    .process_command = ff_filter_process_command,
 };



More information about the ffmpeg-cvslog mailing list