mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
dashdemux: Advance subfragment only if any exist
SIDX based playback is not restricted to SegmentBase, but it possible with SegmentList/SegmentTemplate. In the latter case, each fragment has its own SIDX box and might be subdivided into subfragment. So, demux should not assume that the end of subfragment is the end of stream. Moreover, should try advance subfragment only if there are remaining subfragments. With additional fixes by Sebastian Dröge <sebastian@centricular.com> https://bugzilla.gnome.org/show_bug.cgi?id=776200
This commit is contained in:
parent
4757ec8860
commit
a9c34fb9e3
1 changed files with 14 additions and 9 deletions
|
@ -1965,9 +1965,9 @@ gst_dash_demux_stream_fragment_finished (GstAdaptiveDemux * demux,
|
||||||
&& gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)
|
&& gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)
|
||||||
&& dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
|
&& dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
|
||||||
/* fragment is advanced on data_received when byte limits are reached */
|
/* fragment is advanced on data_received when byte limits are reached */
|
||||||
if (gst_dash_demux_stream_has_next_fragment (stream))
|
if (gst_dash_demux_stream_has_next_subfragment (stream)) {
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
return GST_FLOW_EOS;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (stream->downloading_header || stream->downloading_index))
|
if (G_UNLIKELY (stream->downloading_header || stream->downloading_index))
|
||||||
|
@ -2749,6 +2749,8 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux,
|
||||||
&& (GST_ADAPTIVE_DEMUX (stream->demux)->
|
&& (GST_ADAPTIVE_DEMUX (stream->demux)->
|
||||||
segment.flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS))
|
segment.flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS))
|
||||||
&& advance) {
|
&& advance) {
|
||||||
|
|
||||||
|
if (gst_dash_demux_stream_has_next_subfragment (stream)) {
|
||||||
GstFlowReturn new_ret;
|
GstFlowReturn new_ret;
|
||||||
new_ret =
|
new_ret =
|
||||||
gst_adaptive_demux_stream_advance_fragment (demux, stream,
|
gst_adaptive_demux_stream_advance_fragment (demux, stream,
|
||||||
|
@ -2757,6 +2759,9 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux,
|
||||||
/* only overwrite if it was OK before */
|
/* only overwrite if it was OK before */
|
||||||
if (ret == GST_FLOW_OK)
|
if (ret == GST_FLOW_OK)
|
||||||
ret = new_ret;
|
ret = new_ret;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue