diff options
author | Seungha Yang <sh.yang@lge.com> | 2017-03-15 09:24:39 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-03-15 13:27:23 +0200 |
commit | 42a38b649865bc2efb15d4e7a0aad4135d85ab1d (patch) | |
tree | c28929f913bf40441e15ede3b57ef57c17ad85d8 /ext | |
parent | b65e6db8d4d275cff62184c8e344d7569b4705e3 (diff) | |
download | gstreamer-plugins-bad-42a38b649865bc2efb15d4e7a0aad4135d85ab1d.tar.gz |
dashdemux: Do not advace subfragment after pending SIDX seek done
If a MPD is On-Demand profile and no index described, demux will terminate
download loop after parsing inband SIDX with flow return custom-success.
At this moment, SIDX index is excat target position, but finish_fragment()
might cause re-advancing subfragment depending on MPD structure.
https://bugzilla.gnome.org/show_bug.cgi?id=776200
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dash/gstdashdemux.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index db59b7427..016bb0780 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -1996,7 +1996,10 @@ gst_dash_demux_stream_fragment_finished (GstAdaptiveDemux * demux, && gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client) && dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) { /* fragment is advanced on data_received when byte limits are reached */ - if (gst_dash_demux_stream_has_next_subfragment (stream)) { + if (dashstream->pending_seek_ts != GST_CLOCK_TIME_NONE) { + if (SIDX (dashstream)->entry_index < SIDX (dashstream)->entries_count) + return GST_FLOW_OK; + } else if (gst_dash_demux_stream_has_next_subfragment (stream)) { return GST_FLOW_OK; } } @@ -2530,7 +2533,6 @@ gst_dash_demux_handle_isobmff_buffer (GstAdaptiveDemux * demux, gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) { GST_DEBUG_OBJECT (stream->pad, "Found sidx box, return custom-success to do seeking now"); - dash_stream->pending_seek_ts = GST_CLOCK_TIME_NONE; /* Clear isobmff parser */ gst_adapter_clear (dash_stream->isobmff_adapter); @@ -2731,6 +2733,9 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux, } else if (dash_stream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) { gsize available; + if (G_UNLIKELY (dash_stream->pending_seek_ts != GST_CLOCK_TIME_NONE)) + dash_stream->pending_seek_ts = GST_CLOCK_TIME_NONE; + while (ret == GST_FLOW_OK && ((available = gst_adapter_available (dash_stream->sidx_adapter)) > 0)) { |