Commit 07842abc authored by Max Kellermann's avatar Max Kellermann

input/ffmpeg: add "hls+http://" to the list of supported protocols

Same as e10b867f but it got lost in the merge, because the v0.22 branch uses a different way to detect supported protocols at runtime.
parent 07e52450
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "../InputStream.hxx" #include "../InputStream.hxx"
#include "PluginUnavailable.hxx" #include "PluginUnavailable.hxx"
#include "../InputPlugin.hxx" #include "../InputPlugin.hxx"
#include "util/StringAPI.hxx"
class FfmpegInputStream final : public InputStream { class FfmpegInputStream final : public InputStream {
Ffmpeg::IOContext io; Ffmpeg::IOContext io;
...@@ -79,6 +80,14 @@ input_ffmpeg_protocols() noexcept ...@@ -79,6 +80,14 @@ input_ffmpeg_protocols() noexcept
const char* protocol; const char* protocol;
std::set<std::string> protocols; std::set<std::string> protocols;
while ((protocol = avio_enum_protocols(&opaque, 0))) { while ((protocol = avio_enum_protocols(&opaque, 0))) {
if (StringIsEqual(protocol, "hls")) {
/* just "hls://" doesn't work, but these do
work: */
protocols.emplace("hls+http://");
protocols.emplace("hls+https://");
continue;
}
if (protocol_is_whitelisted(protocol)) { if (protocol_is_whitelisted(protocol)) {
std::string schema(protocol); std::string schema(protocol);
schema.append("://"); schema.append("://");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment