Commit 2d717efd authored by Francois Cartegnie's avatar Francois Cartegnie

demux: hls: don't compute duration from unloaded playlists

parent 5842120f
......@@ -56,7 +56,7 @@ bool M3U8::isLive() const
for(itr = adaptSet->getRepresentations().begin(); itr != adaptSet->getRepresentations().end(); ++itr)
{
const Representation *rep = dynamic_cast<const Representation *>(*itr);
if(rep->isLive())
if(rep->initialized() && rep->isLive())
return true;
}
}
......
......@@ -60,6 +60,11 @@ bool Representation::isLive() const
return b_live;
}
bool Representation::initialized() const
{
return b_loaded;
}
void Representation::setPlaylistUrl(const std::string &uri)
{
playlistUrl = Url(uri);
......
......@@ -45,6 +45,7 @@ namespace hls
void setPlaylistUrl(const std::string &);
Url getPlaylistUrl() const;
bool isLive() const;
bool initialized() const;
virtual bool needsUpdate() const; /* reimpl */
virtual void debug(vlc_object_t *, int) const; /* reimpl */
virtual void runLocalUpdates(mtime_t, uint64_t); /* reimpl */
......
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