]> git.sesse.net Git - vlc/commitdiff
demux: dash: disable seek on live
authorFrancois Cartegnie <fcvlcdev@free.fr>
Sat, 3 Jan 2015 20:18:30 +0000 (21:18 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Sat, 3 Jan 2015 20:18:53 +0000 (21:18 +0100)
modules/demux/dash/DASHManager.cpp
modules/demux/dash/dash.cpp

index f60e6479a51a18149365dce055be75eb4649e25c..4beb8465cd4db54b983b09f568aaab54b43b9816 100644 (file)
@@ -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])
index 924e1f8bb3b59544e4e54981f88774734107559e..14b7f304f6658139b598130870fa1f1a080054f3 100644 (file)
@@ -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;