mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
adaptivedemux: Handle live duration queries
Handle it the same way live sources would, that it by handling the query and return an unknown duration. Fixes #566 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1279>
This commit is contained in:
parent
57c8ad1dbc
commit
9a335105f8
1 changed files with 7 additions and 0 deletions
|
@ -1956,6 +1956,13 @@ gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
|
|||
|
||||
gst_query_parse_duration (query, &fmt, NULL);
|
||||
|
||||
if (gst_adaptive_demux_is_live (demux)) {
|
||||
/* We are able to answer this query: the duration is unknown */
|
||||
gst_query_set_duration (query, fmt, -1);
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (fmt == GST_FORMAT_TIME
|
||||
&& g_atomic_int_get (&demux->priv->have_manifest)) {
|
||||
duration = demux_class->get_duration (demux);
|
||||
|
|
Loading…
Reference in a new issue