summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2017-03-14 16:49:25 +1100
committerMatthew Waters <matthew@centricular.com>2017-03-14 16:50:30 +1100
commitfd8d35298f212487d54b50b3534326a316668ebc (patch)
tree6f56439beabe7442ad01a0d5f7ef8859e6ef2f22 /gst-libs
parentefc015f27deca351e4f7cca1ebf6bc23bad6fd71 (diff)
downloadgstreamer-plugins-bad-fd8d35298f212487d54b50b3534326a316668ebc.tar.gz
Revert "adaptivedemux: answer duration queries for live streams"
Completely disabling duration reporting with live streams is not cool. This reverts commit e1b68d9a65ba512a52c3a2b298fa830a445eb451. https://bugzilla.gnome.org/show_bug.cgi?id=753879
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c12
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.h12
2 files changed, 6 insertions, 18 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 0ffb5307b..e46dc3a4b 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -1748,12 +1748,12 @@ gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
GST_MANIFEST_LOCK (demux);
if (fmt == GST_FORMAT_TIME && demux->priv->have_manifest) {
- if (gst_adaptive_demux_is_live (demux))
- duration = GST_CLOCK_TIME_NONE;
- else
- duration = demux_class->get_duration (demux);
- gst_query_set_duration (query, GST_FORMAT_TIME, duration);
- ret = TRUE;
+ duration = demux_class->get_duration (demux);
+
+ if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0) {
+ gst_query_set_duration (query, GST_FORMAT_TIME, duration);
+ ret = TRUE;
+ }
}
GST_MANIFEST_UNLOCK (demux);
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
index d2d2f01ec..830171467 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
@@ -293,18 +293,6 @@ struct _GstAdaptiveDemuxClass
GstFlowReturn (*update_manifest_data) (GstAdaptiveDemux * demux, GstBuffer * buf);
gboolean (*is_live) (GstAdaptiveDemux * demux);
-
- /**
- * get_duration:
- * @demux: #GstAdaptiveDemux
- *
- * For non-live streams, this will be called to query the duration of the
- * stream.
- *
- * Returns: The duration of the stream, or #GST_CLOCK_TIME_NONE if the
- * duration is unknown
- * Since: 1.6
- */
GstClockTime (*get_duration) (GstAdaptiveDemux * demux);
/**