mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
fftools/cmdutils: do not treat single '-' as an option in locate_option()
Fixes early parsing of trailing -v/-loglevel while using '-' to output to stdout.
This commit is contained in:
parent
e56d676050
commit
840b95bcc2
@ -492,8 +492,9 @@ int locate_option(int argc, char **argv, const OptionDef *options,
|
|||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
const char *cur_opt = argv[i];
|
const char *cur_opt = argv[i];
|
||||||
|
|
||||||
if (*cur_opt++ != '-')
|
if (!(cur_opt[0] == '-' && cur_opt[1]))
|
||||||
continue;
|
continue;
|
||||||
|
cur_opt++;
|
||||||
|
|
||||||
po = find_option(options, cur_opt);
|
po = find_option(options, cur_opt);
|
||||||
if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o')
|
if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user