diff --git a/src/common/AdaptiveStream.cpp b/src/common/AdaptiveStream.cpp index d143936db..fda497ee3 100755 --- a/src/common/AdaptiveStream.cpp +++ b/src/common/AdaptiveStream.cpp @@ -21,6 +21,7 @@ #include #include #include "../oscompat.h" +#include "../log.h" #include using namespace adaptive; @@ -141,7 +142,15 @@ void AdaptiveStream::worker() do { thread_data_->signal_dl_.wait(lckdl); - bool ret = download_segment(); + bool ret(download_segment()); + unsigned int retryCount(10); + + while (!ret && !stopped_ && retryCount-- && tree_.has_timeshift_buffer_) + { + std::this_thread::sleep_for(std::chrono::seconds(1)); + Log(LOGLEVEL_DEBUG, "AdaptiveStream: trying to reload segment ..."); + ret = download_segment(); + } //Signal finished download { diff --git a/src/common/AdaptiveTree.cpp b/src/common/AdaptiveTree.cpp index 99ca33b1b..bfb9124fb 100755 --- a/src/common/AdaptiveTree.cpp +++ b/src/common/AdaptiveTree.cpp @@ -138,6 +138,8 @@ namespace adaptive seg.range_begin_ += fragmentDuration; seg.range_end_ ++; + Log(LOGLEVEL_DEBUG, "AdaptiveTree: insert live segment: pts: %llu range_end: %llu", seg.startPTS_, seg.range_end_); + for (std::vector::iterator b(adpm->repesentations_.begin()), e(adpm->repesentations_.end()); b != e; ++b) (*b)->segments_.insert(seg); } @@ -214,7 +216,7 @@ namespace adaptive } } } - else if (manifestUpdateParam == "etag") + else if (manifestUpdateParam == "full") { update_parameter_ = manifestUpdateParam; } diff --git a/src/main.cpp b/src/main.cpp index 287adacb0..a93a1094e 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -263,8 +263,9 @@ bool KodiAdaptiveStream::download(const char* url, const std::map