summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2011-08-31 02:05:08 +0000
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-08-31 12:09:53 +0200
commit4724b9a5b6e8f9435055613775328d7c33c74cd6 (patch)
tree4aef5aac0a83e4b5a8b3426befdbe5f783694abb
parentf93939b46cedcfe78bad3df4dd55ce410088032a (diff)
hlsdemux: Post duration message when we parse the playlist
-rw-r--r--gst/hls/gsthlsdemux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index 4ea8bfef2..4a9b0aca2 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -980,6 +980,15 @@ gst_hls_demux_cache_fragments (GstHLSDemux * demux)
demux->client->sequence -= demux->fragments_cache;
else
demux->client->sequence = 0;
+ } else {
+ GstClockTime duration = gst_m3u8_client_get_duration (demux->client);
+
+ GST_DEBUG_OBJECT (demux, "Sending duration message : %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (duration));
+ if (duration != GST_CLOCK_TIME_NONE)
+ gst_element_post_message (GST_ELEMENT (demux),
+ gst_message_new_duration (GST_OBJECT (demux),
+ GST_FORMAT_TIME, duration));
}
/* Cache the first fragments */