diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 18:10:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 18:10:35 +0100 |
commit | 5743095ca9566db981b8fe113fc4f330dda5798a (patch) | |
tree | 6b41bfefa2e2ceb11acb489108ce3ad7e72f5922 /cmdutils.c | |
parent | 6b6b0e9daed339ed8da7606a8b043aed6ee2a4c4 (diff) | |
parent | 9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38 (diff) | |
download | ffmpeg-5743095ca9566db981b8fe113fc4f330dda5798a.tar.gz |
Merge commit '9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38'
* commit '9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38':
avconv: print an error on applying options of the wrong type.
atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
output-example: Update to use encode_video2 instead of the now dropped encode_video
Conflicts:
doc/examples/muxing.c
ffmpeg_opt.c
libavutil/atomic.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 9bbb837148..75c1793128 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -378,6 +378,16 @@ int parse_optgroup(void *optctx, OptionGroup *g) for (i = 0; i < g->nb_opts; i++) { Option *o = &g->opts[i]; + if (g->group_def->flags && + !(g->group_def->flags & o->opt->flags)) { + av_log(NULL, AV_LOG_ERROR, "Option %s (%s) cannot be applied to " + "%s %s -- you are trying to apply an input option to an " + "output file or vice versa. Move this option before the " + "file it belongs to.\n", o->key, o->opt->help, + g->group_def->name, g->arg); + return AVERROR(EINVAL); + } + av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n", o->key, o->opt->help, o->val); |