Tweaked seek/isReadyForPlay implementations, fix HLS support for large key durations.

This commit is contained in:
Thulinma 2016-06-10 14:20:17 +02:00
parent a131557a43
commit 055866e2fb
2 changed files with 5 additions and 2 deletions

View file

@ -208,9 +208,12 @@ namespace Mist {
}
bool inputBuffer::removeKey(unsigned int tid) {
if ((myMeta.tracks[tid].keys.size() < 2 || myMeta.tracks[tid].fragments.size() < 2) && config->is_active) {
//Make sure we have at least 3 whole fragments at all times,
//unless we're shutting down the whole buffer right now
if (myMeta.tracks[tid].fragments.size() < 5 && config->is_active) {
return false;
}
//If we're shutting down, and this track is empty, abort
if (!myMeta.tracks[tid].keys.size()) {
return false;
}