diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-07-15 16:51:39 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-07-19 10:38:28 +0300 |
commit | 1959351aecf09fc3e90208ff775f4849801dc13f (patch) | |
tree | 5f44b27d1eccbd91f5b1d3cba5b41c7106431f63 /avconv_opt.c | |
parent | ab7b038906f3e40ed474676d8e3029902a2078f5 (diff) |
avconv: move the no streams failure to open_output_file()
It is a better place for it, there is no reason to wait until
transcode_init().
Diffstat (limited to 'avconv_opt.c')
-rw-r--r-- | avconv_opt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/avconv_opt.c b/avconv_opt.c index e231f539d2..1ec165db01 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1622,6 +1622,12 @@ loop_end: avio_close(pb); } + if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) { + av_dump_format(oc, nb_output_files - 1, oc->filename, 1); + av_log(NULL, AV_LOG_ERROR, "Output file #%d does not contain any stream\n", nb_output_files - 1); + exit_program(1); + } + /* check if all codec options have been used */ unused_opts = strip_specifiers(o->g->codec_opts); for (i = of->ost_index; i < nb_output_streams; i++) { |