From 634b5200ec9daef0ab9c7b6c7f8d5d00f5a665ae Mon Sep 17 00:00:00 2001
From: Ole Andre Birkedal <o.birkedal@sportradar.com>
Date: Fri, 27 May 2016 11:54:03 +0200
Subject: [PATCH] Adding "id" attribute to <Period> tag of DASH manifest. This
 is always 0 because the muxer does not support multiple <Period>'s at the
 moment. This enables FFmpeg generated DASH manifests to fully validate
 according to the DASH specification.

---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 519f9c4..f58a3e0 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -498,7 +498,7 @@ 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<Period start=\"");
+        avio_printf(out, "\t<Period id=\"0\" start=\"");
         write_time(out, start_time);
         avio_printf(out, "\">\n");
     } else {
-- 
2.7.1

