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.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/input/FfmpegInputPlugin.cxx b/src/input/FfmpegInputPlugin.cxx
index 8f9cd0b86..7d041677b 100644
--- a/src/input/FfmpegInputPlugin.cxx
+++ b/src/input/FfmpegInputPlugin.cxx
@@ -24,17 +24,15 @@
#include "FfmpegInputPlugin.hxx"
#include "InputStream.hxx"
#include "InputPlugin.hxx"
+#include "util/StringUtil.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
extern "C" {
-#include <libavutil/avutil.h>
#include <libavformat/avio.h>
#include <libavformat/avformat.h>
}
-#include <glib.h>
-
struct FfmpegInputStream {
InputStream base;
@@ -91,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;