diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp index 687f5bf9db33687be8bf32a67eaf86be378ece24..57ba61ddd59ad1f2dfae574db2f20d7f401c920b 100644 --- a/modules/demux/adaptive/SegmentTracker.cpp +++ b/modules/demux/adaptive/SegmentTracker.cpp @@ -596,18 +596,22 @@ bool SegmentTracker::bufferingAvailable() const return true; } -void SegmentTracker::updateSelected() +bool SegmentTracker::updateSelected() { + bool b_updated; if(current.rep && current.rep->needsUpdate(next.number)) { - bool b_updated = current.rep->runLocalUpdates(resources); + b_updated = current.rep->runLocalUpdates(resources); current.rep->scheduleNextUpdate(current.number, b_updated); if(b_updated) notify(RepresentationUpdatedEvent(current.rep)); } + else b_updated = false; if(current.rep && current.rep->canNoLongerUpdate()) notify(RepresentationUpdateFailedEvent(current.rep)); + + return b_updated; } void SegmentTracker::notify(const TrackerEvent &event) const diff --git a/modules/demux/adaptive/SegmentTracker.hpp b/modules/demux/adaptive/SegmentTracker.hpp index fef3ddd3c19e1f61bb1b9ccaef8e6f236b28929e..6fa508afd48d5f4ddc1566dc32d753f3478273e7 100644 --- a/modules/demux/adaptive/SegmentTracker.hpp +++ b/modules/demux/adaptive/SegmentTracker.hpp @@ -235,7 +235,7 @@ namespace adaptive void notifyBufferingState(bool) const; void notifyBufferingLevel(mtime_t, mtime_t, mtime_t, mtime_t) const; void registerListener(SegmentTrackerListenerInterface *); - void updateSelected(); + bool updateSelected(); bool bufferingAvailable() const; private: