[FFmpeg-cvslog] [ffmpeg] branch master updated. 11a89bfe7b ffmpeg_opt: Parse regular options in `ffpreset` files
ffmpeg-git at ffmpeg.org
ffmpeg-git at ffmpeg.org
Mon Aug 18 17:12:48 EEST 2025
The branch, master has been updated
via 11a89bfe7bedc88980a178c565cc4d237e1ba0d8 (commit)
from d5c8f2268f6b444a744b235642577c9b513183e0 (commit)
- Log -----------------------------------------------------------------
commit 11a89bfe7bedc88980a178c565cc4d237e1ba0d8
Author: Andreas Hartmann <hartan at 7x.de>
AuthorDate: Thu Jul 31 09:01:44 2025 +0200
Commit: Leo Izen <leo.izen at gmail.com>
CommitDate: Mon Aug 18 13:54:30 2025 +0000
ffmpeg_opt: Parse regular options in `ffpreset` files
instead of only AV-specific options. The previous code assumed that any
option not defining the codec in an `ffpreset` file is an AVOption. This
for example prevented the use of options defined in `OptionDef[]`, like
`-pix_fmt`, as part of preset files, requiring users to type these out
every time.
Closes: #1530
Signed-off-by: Andreas Hartmann <hartan at 7x.de>
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index d714a1523a..926a8bda00 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1050,7 +1050,8 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
else if (!strcmp(key, "vcodec")) opt_video_codec (o, key, value);
else if (!strcmp(key, "scodec")) opt_subtitle_codec(o, key, value);
else if (!strcmp(key, "dcodec")) opt_data_codec (o, key, value);
- else if (opt_default_new(o, key, value) < 0) {
+ else if ((parse_option(o, key, value, options) < 0) &&
+ (opt_default_new(o, key, value) < 0)) {
av_log(NULL, AV_LOG_FATAL, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n",
filename, line, key, value);
ret = AVERROR(EINVAL);
-----------------------------------------------------------------------
Summary of changes:
fftools/ffmpeg_opt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
More information about the ffmpeg-cvslog
mailing list