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
This commit is contained in:
Seungha Yang 2016-12-23 15:41:57 +09:00 committed by Sebastian Dröge
parent c0540fb773
commit 4523cff147

View file

@ -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,