1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

fftools/ffmpeg: use new stream specifier API in opt_match_per_stream*()

Removes a lot of error checking code, as matching cannot fail.
This commit is contained in:
Anton Khirnov
2024-08-08 09:10:49 +02:00
parent 46cbe4ab5c
commit d1bdd89c2f
6 changed files with 105 additions and 242 deletions

View File

@@ -288,6 +288,14 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
goto finish;
}
sol->opt[sol->nb_opt - 1].specifier = str;
if (po->flags & OPT_FLAG_PERSTREAM) {
ret = stream_specifier_parse(&sol->opt[sol->nb_opt - 1].stream_spec,
str, 0, NULL);
if (ret < 0)
goto finish;
}
dst = &sol->opt[sol->nb_opt - 1].u;
}