mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
gstdashdemux: add need_header member to know whether the initialization fragment should be pushed
This commit is contained in:
parent
0bed9a6646
commit
6acf2fba8f
2 changed files with 5 additions and 1 deletions
|
@ -593,6 +593,7 @@ gst_dash_demux_src_event (GstPad * pad, GstEvent * event)
|
||||||
demux->position = gst_mpd_client_get_current_position (demux->client);
|
demux->position = gst_mpd_client_get_current_position (demux->client);
|
||||||
demux->position_shift = start - demux->position;
|
demux->position_shift = start - demux->position;
|
||||||
demux->need_segment = TRUE;
|
demux->need_segment = TRUE;
|
||||||
|
demux->need_header = TRUE;
|
||||||
//GST_MPD_CLIENT_UNLOCK (demux->client);
|
//GST_MPD_CLIENT_UNLOCK (demux->client);
|
||||||
|
|
||||||
if (flags & GST_SEEK_FLAG_FLUSH) {
|
if (flags & GST_SEEK_FLAG_FLUSH) {
|
||||||
|
@ -1113,6 +1114,7 @@ gst_dash_demux_reset (GstDashDemux * demux, gboolean dispose)
|
||||||
demux->last_manifest_update = GST_CLOCK_TIME_NONE;
|
demux->last_manifest_update = GST_CLOCK_TIME_NONE;
|
||||||
demux->position = 0;
|
demux->position = 0;
|
||||||
demux->position_shift = 0;
|
demux->position_shift = 0;
|
||||||
|
demux->need_header = TRUE;
|
||||||
demux->need_segment = TRUE;
|
demux->need_segment = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1641,7 +1643,8 @@ need_add_header (GstDashDemux * demux)
|
||||||
caps = gst_dash_demux_get_input_caps (demux, stream);
|
caps = gst_dash_demux_get_input_caps (demux, stream);
|
||||||
if (!demux->input_caps[stream_idx]
|
if (!demux->input_caps[stream_idx]
|
||||||
|| !gst_caps_is_equal (caps, demux->input_caps[stream_idx])
|
|| !gst_caps_is_equal (caps, demux->input_caps[stream_idx])
|
||||||
|| demux->need_segment) {
|
|| demux->need_header) {
|
||||||
|
demux->need_header = FALSE;
|
||||||
switch_caps = TRUE;
|
switch_caps = TRUE;
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -97,6 +97,7 @@ struct _GstDashDemux
|
||||||
GstClockTime position;
|
GstClockTime position;
|
||||||
GstClockTime position_shift;
|
GstClockTime position_shift;
|
||||||
GstClockTime last_position_shift;
|
GstClockTime last_position_shift;
|
||||||
|
gboolean need_header;
|
||||||
gboolean need_segment;
|
gboolean need_segment;
|
||||||
/* Download rate */
|
/* Download rate */
|
||||||
guint64 dnl_rate;
|
guint64 dnl_rate;
|
||||||
|
|
Loading…
Reference in a new issue