Skip to content

Commit e4e9ed2

Browse files
deadbeef84Julusian
authored andcommitted
fix: ffmpeg producer reject ndi://
1 parent 86ed4c6 commit e4e9ed2

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/modules/ffmpeg/producer/ffmpeg_producer.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,9 @@ boost::tribool has_valid_extension(const boost::filesystem::path& filename)
220220
return boost::tribool(boost::indeterminate);
221221
}
222222

223-
bool has_invalid_protocol(const boost::filesystem::path& filename)
223+
bool has_invalid_protocol(const std::wstring& filename)
224224
{
225-
static const auto invalid_protocols = {L"ndi:"};
226-
227-
auto protocol = boost::to_lower_copy(filename.root_name().wstring());
228-
229-
if (std::find(invalid_protocols.begin(), invalid_protocols.end(), protocol) != invalid_protocols.end()) {
230-
return true;
231-
}
232-
return false;
225+
return boost::algorithm::istarts_with(filename, L"ndi://");
233226
}
234227

235228
bool is_readable(const boost::filesystem::path& filename)

0 commit comments

Comments
 (0)