summaryrefslogtreecommitdiff
path: root/ext/hls/m3u8.c
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 /ext/hls/m3u8.c
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 'ext/hls/m3u8.c')
-rw-r--r--ext/hls/m3u8.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index edf08ac4f..807002f49 100644
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -1015,7 +1015,9 @@ gst_m3u8_get_duration (GstM3U8 * m3u8)
GST_M3U8_LOCK (m3u8);
- /* Note: adaptivedemux makes sure we only get duration queries for on-demand streams */
+ /* We can only get the duration for on-demand streams */
+ if (!m3u8->endlist)
+ goto out;
if (!GST_CLOCK_TIME_IS_VALID (m3u8->duration) && m3u8->files != NULL) {
GList *f;
@@ -1026,6 +1028,8 @@ gst_m3u8_get_duration (GstM3U8 * m3u8)
}
duration = m3u8->duration;
+out:
+
GST_M3U8_UNLOCK (m3u8);
return duration;