Commit 0c34f85e authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: dash: disable seek on live

parent ca51f49a
......@@ -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])
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment