Skip to content

Commit

Permalink
fix: ffmpeg producer reject ndi://
Browse files Browse the repository at this point in the history
  • Loading branch information
deadbeef84 authored and Julusian committed Jun 11, 2024
1 parent 86ed4c6 commit e4e9ed2
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/modules/ffmpeg/producer/ffmpeg_producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,9 @@ boost::tribool has_valid_extension(const boost::filesystem::path& filename)
return boost::tribool(boost::indeterminate);
}

bool has_invalid_protocol(const boost::filesystem::path& filename)
bool has_invalid_protocol(const std::wstring& filename)
{
static const auto invalid_protocols = {L"ndi:"};

auto protocol = boost::to_lower_copy(filename.root_name().wstring());

if (std::find(invalid_protocols.begin(), invalid_protocols.end(), protocol) != invalid_protocols.end()) {
return true;
}
return false;
return boost::algorithm::istarts_with(filename, L"ndi://");
}

bool is_readable(const boost::filesystem::path& filename)
Expand Down

0 comments on commit e4e9ed2

Please sign in to comment.