aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/FfmpegInputPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/FfmpegInputPlugin.cxx')
-rw-r--r--src/input/FfmpegInputPlugin.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/input/FfmpegInputPlugin.cxx b/src/input/FfmpegInputPlugin.cxx
index c6f4afb7f..7d041677b 100644
--- a/src/input/FfmpegInputPlugin.cxx
+++ b/src/input/FfmpegInputPlugin.cxx
@@ -24,6 +24,7 @@
#include "FfmpegInputPlugin.hxx"
#include "InputStream.hxx"
#include "InputPlugin.hxx"
+#include "util/StringUtil.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
@@ -32,8 +33,6 @@ extern "C" {
#include <libavformat/avformat.h>
}
-#include <glib.h>
-
struct FfmpegInputStream {
InputStream base;
@@ -90,12 +89,12 @@ input_ffmpeg_open(const char *uri,
Mutex &mutex, Cond &cond,
Error &error)
{
- if (!g_str_has_prefix(uri, "gopher://") &&
- !g_str_has_prefix(uri, "rtp://") &&
- !g_str_has_prefix(uri, "rtsp://") &&
- !g_str_has_prefix(uri, "rtmp://") &&
- !g_str_has_prefix(uri, "rtmpt://") &&
- !g_str_has_prefix(uri, "rtmps://"))
+ if (!StringStartsWith(uri, "gopher://") &&
+ !StringStartsWith(uri, "rtp://") &&
+ !StringStartsWith(uri, "rtsp://") &&
+ !StringStartsWith(uri, "rtmp://") &&
+ !StringStartsWith(uri, "rtmpt://") &&
+ !StringStartsWith(uri, "rtmps://"))
return nullptr;
AVIOContext *h;