diff mbox series

[FFmpeg-devel,2/2] lavfi/(a)format: support slash as a delimiter

Message ID 20220302163539.273347-2-george@nsup.org
State New
Headers show
Series [FFmpeg-devel,1/2] lavfi/(a)format: factor finding the delimiter | expand

Checks

Context Check Description
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Nicolas George March 2, 2022, 4:35 p.m. UTC
Unlike pipe, slash does not require escaping.

Signed-off-by: Nicolas George <george@nsup.org>
---
 doc/filters.texi       | 8 ++++----
 libavfilter/internal.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)


Especially in makefiles, escaping is annoying.
diff mbox series

Patch

diff --git a/doc/filters.texi b/doc/filters.texi
index 8cba7f744d..ac3091c010 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1590,13 +1590,13 @@  It accepts the following parameters:
 @table @option
 
 @item sample_fmts, f
-A '|'-separated list of requested sample formats.
+A '|'- or '/'-separated list of requested sample formats.
 
 @item sample_rates, r
-A '|'-separated list of requested sample rates.
+A '|'- or '/'-separated list of requested sample rates.
 
 @item channel_layouts, cl
-A '|'-separated list of requested channel layouts.
+A '|'- or '/'-separated list of requested channel layouts.
 
 See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils}
 for the required syntax.
@@ -12811,7 +12811,7 @@  It accepts the following parameters:
 @table @option
 
 @item pix_fmts
-A '|'-separated list of pixel format names, such as
+A '|'- or '/'-separated list of pixel format names, such as
 "pix_fmts=yuv420p|monow|rgb24".
 
 @end table
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 74037e5eb9..df94b9f3b3 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -411,7 +411,7 @@  int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link,
  */
 static inline char *ff_formats_list_find_delimiter(const char *str)
 {
-    return (char *)str + strcspn(str, "|");
+    return (char *)str + strcspn(str, "|/");
 }
 
 #endif /* AVFILTER_INTERNAL_H */