aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-26 18:49:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-26 19:54:38 +0100
commitfe0089a6edb974f000b7f8dced4d6c6c3c5f2985 (patch)
tree8842325d0a7bae86e7c02282842c8993ae769eae /ffmpeg.c
parent7ed6b1a1280c9575dabfc1a856cf7b4a4517f3b7 (diff)
downloadffmpeg-fe0089a6edb974f000b7f8dced4d6c6c3c5f2985.tar.gz
ffmpeg: fix -qscale X breaking audio codecs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 0f384b0bd1..463e1f476e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -4918,6 +4918,20 @@ static int opt_bitrate(OptionsContext *o, const char *opt, const char *arg)
return opt_default(opt, arg);
}
+static int opt_qscale(OptionsContext *o, const char *opt, const char *arg)
+{
+ char *s;
+ int ret;
+ if(!strcmp(opt, "qscale")){
+ av_log(0,AV_LOG_WARNING, "Please use -q:a or -q:v, -qscale is ambiguous\n");
+ return parse_option(o, "q:v", arg, options);
+ }
+ s = av_asprintf("q%s", opt + 6);
+ ret = parse_option(o, s, arg, options);
+ av_free(s);
+ return ret;
+}
+
static int opt_video_filters(OptionsContext *o, const char *opt, const char *arg)
{
return parse_option(o, "filter:v", arg, options);
@@ -4981,7 +4995,7 @@ static const OptionDef options[] = {
{ "frames", OPT_INT64 | HAS_ARG | OPT_SPEC, {.off = OFFSET(max_frames)}, "set the number of frames to record", "number" },
{ "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_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" },
#if CONFIG_AVFILTER
{ "filter", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(filters)}, "set stream filterchain", "filter_list" },
#endif