X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=image_input.cpp;fp=image_input.cpp;h=a3a110c6ca293ae8beb12525f574c2c9cf6ad4c1;hb=63f0f22270455648d31a190089be58317a45b9cd;hp=e763ad599d7d7695dbfe7d788c8ba40a06d58eb1;hpb=dc508afd3b72b3c4212753c9a3e90f14d21f460e;p=nageru diff --git a/image_input.cpp b/image_input.cpp index e763ad5..a3a110c 100644 --- a/image_input.cpp +++ b/image_input.cpp @@ -44,6 +44,17 @@ string search_for_file(const string &filename) return filename; } + // See if we match ^[a-z]:/, which is probably a URL of some sort + // (FFmpeg understands various forms of these). + for (size_t i = 0; i < filename.size() - 1; ++i) { + if (filename[i] == ':' && filename[i + 1] == '/') { + return filename; + } + if (!isalpha(filename[i])) { + break; + } + } + // Look for the file in all theme_dirs until we find one; // that will be the permanent resolution of this file, whether // it is actually valid or not.