summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2015-04-27 16:26:34 -0700
committerMichael Niedermayer <michaelni@gmx.at>2015-04-28 03:39:07 +0200
commitb410c69fb66688f3e7c8bb40aca201079b206bd9 (patch)
treeaeda1bf5f248571095a398a75a99de60476906f5
parent464c49155ce7ffc88ed39eb2511e7a75565c24be (diff)
webmdashenc: Fix UTCTiming Element
Remove the direct profile from UTCTiming element. Per DASH spec, direct profile value should be the time at which the request was made to the server and not the time at which the manifest was written. So ffmpeg cannot write this value. This patch removes the direct profile and write the UTCTiming element with the http profile only if a URL is passed as a parameter. Update the fate test to reflect this change. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/webmdashenc.c10
-rw-r--r--tests/ref/fate/webm-dash-manifest-live3
2 files changed, 5 insertions, 8 deletions
diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 1c63a5b0a4..17df1b6a64 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -119,11 +119,11 @@ static void write_header(AVFormatContext *s)
avio_printf(s->pb, " timeShiftBufferDepth=\"PT%gS\"\n", w->time_shift_buffer_depth);
avio_printf(s->pb, " minimumUpdatePeriod=\"PT%dS\"", w->minimum_update_period);
avio_printf(s->pb, ">\n");
- avio_printf(s->pb, "<UTCTiming\n");
- avio_printf(s->pb, " schemeIdUri=\"%s\"\n",
- w->utc_timing_url ? "urn:mpeg:dash:utc:http-iso:2014" : "urn:mpeg:dash:utc:direct:2012");
- avio_printf(s->pb, " value=\"%s\"/>\n",
- w->utc_timing_url ? w->utc_timing_url : gmt_iso);
+ if (w->utc_timing_url) {
+ avio_printf(s->pb, "<UTCTiming\n");
+ avio_printf(s->pb, " schemeIdUri=\"urn:mpeg:dash:utc:http-iso:2014\"\n");
+ avio_printf(s->pb, " value=\"%s\"/>\n", w->utc_timing_url);
+ }
}
}
diff --git a/tests/ref/fate/webm-dash-manifest-live b/tests/ref/fate/webm-dash-manifest-live
index 91a1c1dcee..6df7f87cca 100644
--- a/tests/ref/fate/webm-dash-manifest-live
+++ b/tests/ref/fate/webm-dash-manifest-live
@@ -9,9 +9,6 @@
availabilityStartTime=""
timeShiftBufferDepth="PT7200S"
minimumUpdatePeriod="PT60S">
-<UTCTiming
- schemeIdUri="urn:mpeg:dash:utc:direct:2012"
- value=""/>
<Period id="0" start="PT0S" >
<AdaptationSet id="0" mimeType="video/webm" codecs="vp9" bitstreamSwitching="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<ContentComponent id="1" type="video"/>