From 95f1004bdfdf2d26c330c1d4b7c4ac9352d60b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Gro=C3=9Fe?= Date: Fri, 27 Jan 2017 00:25:08 +0100 Subject: dashenc: add mandatory id to AdaptationSet and Period in manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Große Signed-off-by: Martin Storsjö --- libavformat/dashenc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavformat/dashenc.c') diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 2b27950..865f50a 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -439,7 +439,7 @@ static int write_manifest(AVFormatContext *s, int final) DASHContext *c = s->priv_data; AVIOContext *out; char temp_filename[1024]; - int ret, i; + int ret, i, as_id = 0; AVDictionaryEntry *title = av_dict_get(s->metadata, "title", NULL, 0); snprintf(temp_filename, sizeof(temp_filename), "%s.tmp", s->filename); @@ -494,15 +494,15 @@ static int write_manifest(AVFormatContext *s, int final) OutputStream *os = &c->streams[0]; int start_index = FFMAX(os->nb_segments - c->window_size, 0); int64_t start_time = av_rescale_q(os->segments[start_index]->time, s->streams[0]->time_base, AV_TIME_BASE_Q); - avio_printf(out, "\t\n"); } else { - avio_printf(out, "\t\n"); + avio_printf(out, "\t\n"); } if (c->has_video) { - avio_printf(out, "\t\t\n"); + avio_printf(out, "\t\t\n", as_id++); for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; OutputStream *os = &c->streams[i]; @@ -515,7 +515,7 @@ static int write_manifest(AVFormatContext *s, int final) avio_printf(out, "\t\t\n"); } if (c->has_audio) { - avio_printf(out, "\t\t\n"); + avio_printf(out, "\t\t\n", as_id++); for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; OutputStream *os = &c->streams[i]; -- cgit v1.1