diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-08 22:51:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-25 01:27:21 +0100 |
commit | 85d7e02e4af4e6250be77ec43a72807d029a0061 (patch) | |
tree | 24e69f84af054c5eae4b41640701ca95410c85af /ffmpeg_opt.c | |
parent | a1062e1437c0f5432cdcb03ac8931b30f3b9d170 (diff) | |
download | ffmpeg-85d7e02e4af4e6250be77ec43a72807d029a0061.tar.gz |
ffmpeg: allow overriding and amending AVStream->disposition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 9fe54fffbf..c5e38967fa 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1186,6 +1186,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e ost->enc_ctx->global_quality = FF_QP2LAMBDA * qscale; } + MATCH_PER_STREAM_OPT(disposition, str, ost->disposition, oc, st); + ost->disposition = av_strdup(ost->disposition); + if (oc->oformat->flags & AVFMT_GLOBALHEADER) ost->enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; @@ -2937,6 +2940,9 @@ const OptionDef options[] = { { "discard", OPT_STRING | HAS_ARG | OPT_SPEC | OPT_INPUT, { .off = OFFSET(discard) }, "discard", "" }, + { "disposition", OPT_STRING | HAS_ARG | OPT_SPEC | + OPT_OUTPUT, { .off = OFFSET(disposition) }, + "disposition", "" }, /* video options */ { "vframes", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_video_frames }, |