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

Same as e10b867fe6 but it got lost in
the merge, because the v0.22 branch uses a different way to detect
supported protocols at runtime.
This commit is contained in:
Max Kellermann 2020-09-21 11:45:56 +02:00
parent 07e524509f
commit 07842abcb0

View File

@ -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<std::string> 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("://");