summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2016-12-23 15:41:57 +0900
committerSebastian Dröge <sebastian@centricular.com>2016-12-23 12:16:10 +0200
commit4523cff1472bedeb3221a470c3f76fb7c24a6f7e (patch)
tree3df7b8931bd1fb408c28169cd92a91c6497e4829 /ext
parentc0540fb7731d9f69ab5bc6b311cc8f5cd00a5826 (diff)
downloadgstreamer-plugins-bad-4523cff1472bedeb3221a470c3f76fb7c24a6f7e.tar.gz
dashdemux: Add first_offset of sidx box to base offset
sidx has "first_offset" syntax which represents the distance in bytes from anchor point to media fragment. If present, we should adjust sidx_base_offset. https://bugzilla.gnome.org/show_bug.cgi?id=776431
Diffstat (limited to 'ext')
-rw-r--r--ext/dash/gstdashdemux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index d99691af9..f6f812f6b 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -2172,6 +2172,13 @@ gst_dash_demux_parse_isobmff (GstAdaptiveDemux * demux,
&dummy);
if (res == GST_ISOFF_PARSER_DONE) {
+ guint64 first_offset = dash_stream->sidx_parser.sidx.first_offset;
+ if (first_offset) {
+ GST_LOG_OBJECT (stream->pad,
+ "non-zero sidx first offset %" G_GUINT64_FORMAT, first_offset);
+ dash_stream->sidx_base_offset += first_offset;
+ }
+
if (GST_CLOCK_TIME_IS_VALID (dash_stream->pending_seek_ts)) {
/* FIXME, preserve seek flags */
gst_dash_demux_stream_sidx_seek (dash_stream,