[vlc-commits] demux: dash: disable seek on live

Francois Cartegnie git at videolan.org
Sat Jan 3 21:19:45 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jan  3 21:18:30 2015 +0100| [0c34f85ebfab621abf8a43f823fc037a1a172b99] | committer: Francois Cartegnie

demux: dash: disable seek on live

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c34f85ebfab621abf8a43f823fc037a1a172b99
---

 modules/demux/dash/DASHManager.cpp |    3 +++
 modules/demux/dash/dash.cpp        |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/demux/dash/DASHManager.cpp b/modules/demux/dash/DASHManager.cpp
index f60e647..4beb846 100644
--- a/modules/demux/dash/DASHManager.cpp
+++ b/modules/demux/dash/DASHManager.cpp
@@ -177,6 +177,9 @@ bool DASHManager::setPosition(mtime_t time)
 
 bool DASHManager::seekAble() const
 {
+    if(mpd->isLive())
+        return false;
+
     for(int type=0; type<Streams::count; type++)
     {
         if(!streams[type])
diff --git a/modules/demux/dash/dash.cpp b/modules/demux/dash/dash.cpp
index 924e1f8..14b7f30 100644
--- a/modules/demux/dash/dash.cpp
+++ b/modules/demux/dash/dash.cpp
@@ -223,13 +223,15 @@ static int  Control         (demux_t *p_demux, int i_query, va_list args)
             break;
 
         case DEMUX_SET_POSITION:
-            if(!p_sys->p_dashManager->getDuration() ||
+            if(p_sys->p_mpd->isLive() ||
+               !p_sys->p_dashManager->getDuration() ||
                !p_sys->p_dashManager->setPosition( p_sys->p_dashManager->getDuration() * va_arg(args, double)))
                 return VLC_EGENERIC;
             break;
 
         case DEMUX_SET_TIME:
-            if(!p_sys->p_dashManager->setPosition(va_arg(args, int64_t)))
+            if(p_sys->p_mpd->isLive() ||
+               !p_sys->p_dashManager->setPosition(va_arg(args, int64_t)))
                 return VLC_EGENERIC;
             break;
 



More information about the vlc-commits mailing list