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:
Edward Hervey 2020-05-19 10:27:18 +02:00 committed by GStreamer Merge Bot
parent 57c8ad1dbc
commit 9a335105f8

View file

@ -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);