From 1443859a8d0dcffdc01f969f7cde61769aaca31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Gro=C3=9Fe?= Date: Thu, 26 Oct 2017 17:58:37 +0200 Subject: [PATCH] dashenc: don't write header data before the first packet arrives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 1b8ef01f04ab ("dashenc: add webm support") Signed-off-by: Peter Große Signed-off-by: Michael Niedermayer --- libavformat/dashenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 0ca7cf5aa3..23b2d3fed4 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -782,7 +782,7 @@ static int dash_init(AVFormatContext *s) av_dict_set_int(&opts, "dash_track_number", i + 1, 0); av_dict_set_int(&opts, "live", 1, 0); } - if ((ret = avformat_write_header(ctx, &opts)) < 0) + if ((ret = avformat_init_output(ctx, &opts)) < 0) return ret; os->ctx_inited = 1; avio_flush(ctx->pb);