]> git.sesse.net Git - ffmpeg/commitdiff
dashenc: move UTCTiming element to the end of the manifest
authorPeter Große <pegro@friiks.de>
Fri, 27 Oct 2017 19:18:47 +0000 (21:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 28 Oct 2017 18:24:04 +0000 (20:24 +0200)
Required by comformance XSD [1].

[1] https://github.com/Dash-Industry-Forum/Conformance-and-reference-source/blob/master/conformance/MPDValidator/schemas/DASH-MPD.xsd

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/dashenc.c

index 5086f4a21f8f9ae8f6e0d4473119b652e9833f91..04b0fd99e67871ecd30fec4464edde44165a7442 100644 (file)
@@ -627,8 +627,6 @@ static int write_manifest(AVFormatContext *s, int final)
         av_free(escaped);
     }
     avio_printf(out, "\t</ProgramInformation>\n");
-    if (c->utc_timing_url)
-        avio_printf(out, "\t<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-xsdate:2014\" value=\"%s\"/>\n", c->utc_timing_url);
 
     if (c->window_size && s->nb_streams > 0 && c->streams[0].nb_segments > 0 && !c->use_template) {
         OutputStream *os = &c->streams[0];
@@ -646,6 +644,10 @@ static int write_manifest(AVFormatContext *s, int final)
             return ret;
     }
     avio_printf(out, "\t</Period>\n");
+
+    if (c->utc_timing_url)
+        avio_printf(out, "\t<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-xsdate:2014\" value=\"%s\"/>\n", c->utc_timing_url);
+
     avio_printf(out, "</MPD>\n");
     avio_flush(out);
     ff_format_io_close(s, &out);