}
/**
- * Parse a metadata specifier in arg.
+ * Parse a metadata specifier passed as 'arg' parameter.
* @param type metadata type is written here -- g(lobal)/s(tream)/c(hapter)/p(rogram)
* @param index for type c/p, chapter/program index is written here
* @param stream_spec for type s, the stream specifier is written here
return avcodec_find_decoder(st->codec->codec_id);
}
-/**
- * Add all the streams from the given input file to the global
- * list of input streams.
- */
+/* Add all the streams from the given input file to the global
+ * list of input streams. */
static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
{
int i;
ist->dec = choose_decoder(o, ic, st);
+ ist->reinit_filters = -1;
+ MATCH_PER_STREAM_OPT(reinit_filters, i, ist->reinit_filters, ic, st);
+
switch (dec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if(!ist->dec)
const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE;
int show_advanced = 0, show_avoptions = 0;
- if (opt) {
+ if (opt && *opt) {
if (!strcmp(opt, "long"))
show_advanced = 1;
else if (!strcmp(opt, "full"))
"set profile", "profile" },
{ "filter", HAS_ARG | OPT_STRING | OPT_SPEC, { .off = OFFSET(filters) },
"set stream filterchain", "filter_list" },
+ { "reinit_filter", HAS_ARG | OPT_INT | OPT_SPEC, { .off = OFFSET(reinit_filters) },
+ "reinit filtergraph on input parameter changes", "" },
{ "filter_complex", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex },
"create a complex filtergraph", "graph_description" },
{ "stats", OPT_BOOL, { &print_stats },