case-insensitive URI scheme comparison
Required according to RFC 3986: > An implementation should accept uppercase letters as equivalent to > lowercase in scheme names Closes #330
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "../InputStream.hxx"
|
||||
#include "../InputPlugin.hxx"
|
||||
#include "PluginUnavailable.hxx"
|
||||
#include "util/StringCompare.hxx"
|
||||
#include "util/ASCII.hxx"
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avio.h>
|
||||
@@ -85,12 +85,12 @@ static InputStream *
|
||||
input_ffmpeg_open(const char *uri,
|
||||
Mutex &mutex, Cond &cond)
|
||||
{
|
||||
if (!StringStartsWith(uri, "gopher://") &&
|
||||
!StringStartsWith(uri, "rtp://") &&
|
||||
!StringStartsWith(uri, "rtsp://") &&
|
||||
!StringStartsWith(uri, "rtmp://") &&
|
||||
!StringStartsWith(uri, "rtmpt://") &&
|
||||
!StringStartsWith(uri, "rtmps://"))
|
||||
if (!StringStartsWithCaseASCII(uri, "gopher://") &&
|
||||
!StringStartsWithCaseASCII(uri, "rtp://") &&
|
||||
!StringStartsWithCaseASCII(uri, "rtsp://") &&
|
||||
!StringStartsWithCaseASCII(uri, "rtmp://") &&
|
||||
!StringStartsWithCaseASCII(uri, "rtmpt://") &&
|
||||
!StringStartsWithCaseASCII(uri, "rtmps://"))
|
||||
return nullptr;
|
||||
|
||||
AVIOContext *h;
|
||||
|
||||
Reference in New Issue
Block a user