From 5061a1a3dc8d947dcf1afd732127dd82bb6cc4d9 Mon Sep 17 00:00:00 2001 From: peak3d Date: Fri, 27 Jul 2018 17:40:48 +0200 Subject: [PATCH] AdaptveTree: relink aadpset in psshset if stream was merged to avoud access to erased adpsets --- src/common/AdaptiveTree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/AdaptiveTree.cpp b/src/common/AdaptiveTree.cpp index 76a3dfd80..a5987aeb0 100755 --- a/src/common/AdaptiveTree.cpp +++ b/src/common/AdaptiveTree.cpp @@ -277,6 +277,10 @@ namespace adaptive { if ((*ba)->type_ == AUDIO && ba + 1 != ea && AdaptationSet::mergeable(*ba, *(ba + 1))) { + for (size_t i(1); i < psshSets_.size(); ++i) + if (psshSets_[i].adaptation_set_ == *ba) + psshSets_[i].adaptation_set_ = *(ba + 1); + (*(ba + 1))->repesentations_.insert((*(ba + 1))->repesentations_.end(), (*ba)->repesentations_.begin(), (*ba)->repesentations_.end()); (*ba)->repesentations_.clear(); ba = (*bp)->adaptationSets_.erase(ba);