[FFmpeg-cvslog] ffmpeg: fix plain -profile support
Michael Niedermayer
git at videolan.org
Sun Apr 1 21:56:33 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 1 20:48:20 2012 +0200| [ce9bd303794fcc94aa232c116bece13c5994b55b] | committer: Michael Niedermayer
ffmpeg: fix plain -profile support
Fixes Ticket387
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce9bd303794fcc94aa232c116bece13c5994b55b
---
ffmpeg.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 6fcaa5b..5e4fd66 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -5009,6 +5009,15 @@ static int opt_qscale(OptionsContext *o, const char *opt, const char *arg)
return ret;
}
+static int opt_profile(OptionsContext *o, const char *opt, const char *arg)
+{
+ if(!strcmp(opt, "profile")){
+ av_log(NULL, AV_LOG_WARNING, "Please use -profile:a or -profile:v, -profile is ambiguous\n");
+ return parse_option(o, "profile:v", arg, options);
+ }
+ return opt_default(opt, arg);
+}
+
static int opt_video_filters(OptionsContext *o, const char *opt, const char *arg)
{
return parse_option(o, "filter:v", arg, options);
@@ -5087,6 +5096,7 @@ static const OptionDef options[] = {
{ "tag", OPT_STRING | HAS_ARG | OPT_SPEC, {.off = OFFSET(codec_tags)}, "force codec tag/fourcc", "fourcc/tag" },
{ "q", HAS_ARG | OPT_EXPERT | OPT_DOUBLE | OPT_SPEC, {.off = OFFSET(qscale)}, "use fixed quality scale (VBR)", "q" },
{ "qscale", HAS_ARG | OPT_EXPERT | OPT_FUNC2, {(void*)opt_qscale}, "use fixed quality scale (VBR)", "q" },
+ { "profile", HAS_ARG | OPT_EXPERT | OPT_FUNC2, {(void*)opt_profile}, "set profile", "profile" },
#if CONFIG_AVFILTER
{ "filter", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(filters)}, "set stream filterchain", "filter_list" },
#endif
More information about the ffmpeg-cvslog
mailing list