diff options
author | Alex Ashley <bugzilla@ashley-family.net> | 2016-02-05 12:44:23 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-03-02 19:54:04 +0200 |
commit | e1b68d9a65ba512a52c3a2b298fa830a445eb451 (patch) | |
tree | e8aa130ceb1fe06b33d03a10cdf38066229aaa4d /ext/dash | |
parent | b2e9891f8a06b07fad61204bda5b814a2ad5ef88 (diff) | |
download | gstreamer-plugins-bad-e1b68d9a65ba512a52c3a2b298fa830a445eb451.tar.gz |
adaptivedemux: answer duration queries for live streams
For duration queries on live streams, adaptivedemux ignores the query.
The problem then is that the query is answered by the downstream
qtdemux element, with the duration of the currently passing fragment.
This commit changes the behaviour of adaptivedemux to answer the duration
queries for live streams, returning GST_CLOCK_TIME_NONE.
https://bugzilla.gnome.org/show_bug.cgi?id=753879
Diffstat (limited to 'ext/dash')
-rw-r--r-- | ext/dash/gstmpdparser.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index baf5dbc83..25eaab7d5 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -5483,18 +5483,12 @@ gst_mpd_client_get_next_fragment_duration (GstMpdClient * client, GstClockTime gst_mpd_client_get_media_presentation_duration (GstMpdClient * client) { - GstClockTime duration; - g_return_val_if_fail (client != NULL, GST_CLOCK_TIME_NONE); - if (client->mpd_node->mediaPresentationDuration != -1) { - duration = client->mpd_node->mediaPresentationDuration * GST_MSECOND; - } else { - /* We can only get the duration for on-demand streams */ - duration = GST_CLOCK_TIME_NONE; - } - - return duration; + /* Note: adaptivedemux makes sure we only get duration queries for on-demand streams */ + g_return_val_if_fail (client->mpd_node->mediaPresentationDuration != -1, + GST_CLOCK_TIME_NONE); + return client->mpd_node->mediaPresentationDuration * GST_MSECOND; } gboolean |