From 07842abcb04a13d9ae739b1b37c453a0510be0a5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Sep 2020 11:45:56 +0200 Subject: [PATCH] input/ffmpeg: add "hls+http://" to the list of supported protocols Same as e10b867fe6ffbac1ac37a333dbd69597e4fc9f03 but it got lost in the merge, because the v0.22 branch uses a different way to detect supported protocols at runtime. --- src/input/plugins/FfmpegInputPlugin.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/input/plugins/FfmpegInputPlugin.cxx b/src/input/plugins/FfmpegInputPlugin.cxx index f0c0d4ad8..fdd91a33b 100644 --- a/src/input/plugins/FfmpegInputPlugin.cxx +++ b/src/input/plugins/FfmpegInputPlugin.cxx @@ -26,6 +26,7 @@ #include "../InputStream.hxx" #include "PluginUnavailable.hxx" #include "../InputPlugin.hxx" +#include "util/StringAPI.hxx" class FfmpegInputStream final : public InputStream { Ffmpeg::IOContext io; @@ -79,6 +80,14 @@ input_ffmpeg_protocols() noexcept const char* protocol; std::set protocols; 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)) { std::string schema(protocol); schema.append("://");