Skip to content

Commit 0c34f85

Browse files
committed
demux: dash: disable seek on live
1 parent ca51f49 commit 0c34f85

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

modules/demux/dash/DASHManager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ bool DASHManager::setPosition(mtime_t time)
177177

178178
bool DASHManager::seekAble() const
179179
{
180+
if(mpd->isLive())
181+
return false;
182+
180183
for(int type=0; type<Streams::count; type++)
181184
{
182185
if(!streams[type])

modules/demux/dash/dash.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,15 @@ static int Control (demux_t *p_demux, int i_query, va_list args)
223223
break;
224224

225225
case DEMUX_SET_POSITION:
226-
if(!p_sys->p_dashManager->getDuration() ||
226+
if(p_sys->p_mpd->isLive() ||
227+
!p_sys->p_dashManager->getDuration() ||
227228
!p_sys->p_dashManager->setPosition( p_sys->p_dashManager->getDuration() * va_arg(args, double)))
228229
return VLC_EGENERIC;
229230
break;
230231

231232
case DEMUX_SET_TIME:
232-
if(!p_sys->p_dashManager->setPosition(va_arg(args, int64_t)))
233+
if(p_sys->p_mpd->isLive() ||
234+
!p_sys->p_dashManager->setPosition(va_arg(args, int64_t)))
233235
return VLC_EGENERIC;
234236
break;
235237

0 commit comments

Comments
 (0)