summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-10-07 15:44:39 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2016-10-07 16:02:14 +0200
commitab7e83efed9c8fb30777287304c0de3cc614ce57 (patch)
treee8750d6e4819c9789609a04920cc3888fd0af23b /ffmpeg.c
parent572f16e10041c9af131709f88a53750a4b3db802 (diff)
ffmpeg: explicitly write headers for files with no streams
Recent changes to ffmpeg.c tied output file init to stream init, which broke stream-less files, specifically ffmetadata output.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 454e19330f..49d91bee79 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3460,6 +3460,16 @@ static int transcode_init(void)
}
}
+ /* write headers for files with no streams */
+ for (i = 0; i < nb_output_files; i++) {
+ oc = output_files[i]->ctx;
+ if (oc->oformat->flags & AVFMT_NOSTREAMS && oc->nb_streams == 0) {
+ ret = check_init_output_file(output_files[i], i);
+ if (ret < 0)
+ goto dump_format;
+ }
+ }
+
dump_format:
/* dump the stream mapping */
av_log(NULL, AV_LOG_INFO, "Stream mapping:\n");