Skip to content

Commit

Permalink
[HLS] check for base_url when adding parameters in #EXT-X-STREAM-INF,…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
peak3d committed Jul 27, 2018
1 parent f1f16f3 commit 48a9928
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/parser/HLSTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ bool HLSTree::open(const std::string &url, const std::string &manifestUpdatePara
rep->source_url_ = res->second;

if (!manifest_parameter_.empty()
&& rep->source_url_.compare(0, base_url_.size(), base_url_) == 0
&& rep->source_url_.find('?') == std::string::npos)
&& rep->source_url_.compare(0, base_url_.size(), base_url_) == 0
&& rep->source_url_.find('?') == std::string::npos)
rep->source_url_ += manifest_parameter_;
}
else
Expand Down Expand Up @@ -212,7 +212,9 @@ bool HLSTree::open(const std::string &url, const std::string &manifestUpdatePara
else
current_representation_->source_url_ = line;

if (!manifest_parameter_.empty() && current_representation_->source_url_.find('?') == std::string::npos)
if (!manifest_parameter_.empty()
&& rep->source_url_.compare(0, base_url_.size(), base_url_) == 0
&& current_representation_->source_url_.find('?') == std::string::npos)
current_representation_->source_url_ += manifest_parameter_;

//Ignore duplicate reps
Expand Down

0 comments on commit 48a9928

Please sign in to comment.