Skip to content
Snippets Groups Projects
Commit c7389666 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Ignore fsid 255

parent 1a5c872d
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,16 @@ const std::unordered_set<ftl::codecs::Channel> &Stream::selected(int fs) const {
}
std::unordered_set<ftl::codecs::Channel> Stream::selectedNoExcept(int fs) const {
if (fs == 255) return {};
SHARED_LOCK(mtx_, lk);
if (fs < 0 || static_cast<uint32_t>(fs) >= state_.size()) return {};
return state_[fs].selected;
}
void Stream::select(int fs, const std::unordered_set<ftl::codecs::Channel> &s, bool make) {
if (fs == 255) return;
UNIQUE_LOCK(mtx_, lk);
if (fs < 0 || (!make && static_cast<uint32_t>(fs) >= state_.size())) throw FTL_Error("Frameset index out-of-bounds: " << fs);
if (static_cast<uint32_t>(fs) >= state_.size()) state_.resize(fs+1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment