diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-11 17:39:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-11 17:57:06 +0200 |
commit | 0c79c96cf20f96dfe4b9ce429dafddd1f9ecd1c1 (patch) | |
tree | 43b13d895777ded6e3f27dea858fb44e09b4d149 | |
parent | 48fb5294d03f1d25ec8ba370a0cb4258fc21e88e (diff) | |
download | ffmpeg-0c79c96cf20f96dfe4b9ce429dafddd1f9ecd1c1.tar.gz |
doc/examples/muxing: Add support to pass flags to muxer as since codecpar the codec flags are not available to the muxer anymore
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | doc/examples/muxing.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c index 2fbc89bb02..2fc6f710ee 100644 --- a/doc/examples/muxing.c +++ b/doc/examples/muxing.c @@ -565,6 +565,7 @@ int main(int argc, char **argv) int have_video = 0, have_audio = 0; int encode_video = 0, encode_audio = 0; AVDictionary *opt = NULL; + int i; /* Initialize libavcodec, and register all codecs and formats. */ av_register_all(); @@ -581,8 +582,9 @@ int main(int argc, char **argv) } filename = argv[1]; - if (argc > 3 && !strcmp(argv[2], "-flags")) { - av_dict_set(&opt, argv[2]+1, argv[3], 0); + for (i = 2; i+1 < argc; i+=2) { + if (!strcmp(argv[i], "-flags") || !strcmp(argv[i], "-fflags")) + av_dict_set(&opt, argv[i]+1, argv[i+1], 0); } /* allocate the output media context */ |