diff options
author | Louis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk> | 2013-01-23 16:43:12 -0500 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-05-08 18:14:33 -0300 |
commit | 6acf2fba8f89899fae258eaa14e10410508ac747 (patch) | |
tree | 08cc71ffad060dc76e425faba49a6fb5043480c0 /ext/dash | |
parent | 0bed9a6646c58e1aa92e54f163d740e73b6ddd5d (diff) | |
download | gstreamer-plugins-bad-6acf2fba8f89899fae258eaa14e10410508ac747.tar.gz |
gstdashdemux: add need_header member to know whether the initialization fragment should be pushed
Diffstat (limited to 'ext/dash')
-rw-r--r-- | ext/dash/gstdashdemux.c | 5 | ||||
-rw-r--r-- | ext/dash/gstdashdemux.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index 6bfeeb4ed..8177e5419 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -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_shift = start - demux->position; demux->need_segment = TRUE; + demux->need_header = TRUE; //GST_MPD_CLIENT_UNLOCK (demux->client); 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->position = 0; demux->position_shift = 0; + demux->need_header = TRUE; demux->need_segment = TRUE; } @@ -1641,7 +1643,8 @@ need_add_header (GstDashDemux * demux) caps = gst_dash_demux_get_input_caps (demux, stream); if (!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; gst_caps_unref (caps); break; diff --git a/ext/dash/gstdashdemux.h b/ext/dash/gstdashdemux.h index 9508361f7..dcaefd0ec 100644 --- a/ext/dash/gstdashdemux.h +++ b/ext/dash/gstdashdemux.h @@ -97,6 +97,7 @@ struct _GstDashDemux GstClockTime position; GstClockTime position_shift; GstClockTime last_position_shift; + gboolean need_header; gboolean need_segment; /* Download rate */ guint64 dnl_rate; |