summaryrefslogtreecommitdiffstats
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-19 14:01:06 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-19 14:01:45 +0200
commit3b0534efdcde122ace74196be8c22afd9b03c017 (patch)
treecf87b0aa070ca9279229dd0eb25096e03bca5d47 /ffmpeg_opt.c
parent15fbf3e72a643b6b3d32ab6fa687ca2ca3d2fde1 (diff)
parent1959351aecf09fc3e90208ff775f4849801dc13f (diff)
downloadffmpeg-streaming-3b0534efdcde122ace74196be8c22afd9b03c017.zip
ffmpeg-streaming-3b0534efdcde122ace74196be8c22afd9b03c017.tar.gz
Merge commit '1959351aecf09fc3e90208ff775f4849801dc13f'
* commit '1959351aecf09fc3e90208ff775f4849801dc13f': avconv: move the no streams failure to open_output_file() Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 9110044..b9a5c39 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2150,6 +2150,12 @@ loop_end:
exit_program(1);
}
+ 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++) {
OpenPOWER on IntegriCloud