adaptivedemux: restart the manifest update task after a seek
authorMatthew Waters <matthew@centricular.com>
Wed, 9 Nov 2016 10:15:29 +0000 (21:15 +1100)
committerMatthew Waters <matthew@centricular.com>
Thu, 10 Nov 2016 13:11:25 +0000 (00:11 +1100)
For formats that need to update the manifest to know about new
fragments as they're being written by the server would never receive an
updated fragment list after a seek event

https://bugzilla.gnome.org/show_bug.cgi?id=774177

gst-libs/gst/adaptivedemux/gstadaptivedemux.c

index bf311d3..3210ae7 100644 (file)
@@ -1530,6 +1530,13 @@ gst_adaptive_demux_handle_seek_event (GstAdaptiveDemux * demux, GstPad * pad,
 
   /* Restart the demux */
   gst_adaptive_demux_start_tasks (demux);
+  if (gst_adaptive_demux_is_live (demux)) {
+    g_mutex_lock (&demux->priv->updates_timed_lock);
+    demux->priv->stop_updates_task = FALSE;
+    g_mutex_unlock (&demux->priv->updates_timed_lock);
+    /* Task to periodically update the manifest */
+    gst_task_start (demux->priv->updates_task);
+  }
   GST_MANIFEST_UNLOCK (demux);
   GST_API_UNLOCK (demux);
   gst_event_unref (event);