static int do_psnr = 0;
static int input_sync;
static int override_ffserver = 0;
+static int input_stream_potentially_available = 0;
static void uninit_options(OptionsContext *o)
{
av_dict_free(&opts[i]);
av_freep(&opts);
+ input_stream_potentially_available = 1;
+
return 0;
}
}
}
+ if (!(oc->oformat->flags & AVFMT_NOSTREAMS) && !input_stream_potentially_available) {
+ av_log(NULL, AV_LOG_ERROR,
+ "No input streams but output needs an input stream\n");
+ exit_program(1);
+ }
+
if (!(oc->oformat->flags & AVFMT_NOFILE)) {
/* test if it already exists to avoid losing precious files */
assert_file_overwrite(filename);
filtergraphs[nb_filtergraphs - 1]->graph_desc = av_strdup(arg);
if (!filtergraphs[nb_filtergraphs - 1]->graph_desc)
return AVERROR(ENOMEM);
+
+ input_stream_potentially_available = 1;
+
return 0;
}
return AVERROR(ENOMEM);
filtergraphs[nb_filtergraphs - 1]->index = nb_filtergraphs - 1;
filtergraphs[nb_filtergraphs - 1]->graph_desc = graph_desc;
+
+ input_stream_potentially_available = 1;
+
return 0;
}
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(top_field_first) },
"top=1/bottom=0/auto=-1 field first", "" },
{ "vtag", OPT_VIDEO | HAS_ARG | OPT_EXPERT | OPT_PERFILE |
- OPT_OUTPUT, { .func_arg = opt_old2new },
+ OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_old2new },
"force video tag/fourcc", "fourcc/tag" },
{ "qphist", OPT_VIDEO | OPT_BOOL | OPT_EXPERT , { &qp_hist },
"show QP histogram" },