From 2e95b0dd9e3d89a5b9f0c8b6ff6b3c5f6abe6c42 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sun, 26 Oct 2014 20:36:49 -0400 Subject: [PATCH] Tweaked videobuffer to support using video files (for testing) --- src/video/videobuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/videobuffer.cpp b/src/video/videobuffer.cpp index d5363be..17c47c6 100644 --- a/src/video/videobuffer.cpp +++ b/src/video/videobuffer.cpp @@ -46,7 +46,7 @@ VideoDispatcher* VideoBuffer::createDispatcher(std::string mjpeg_url, int fps) void VideoBuffer::connect(std::string mjpeg_url, int fps) { - if (hasEnding(mjpeg_url, ".mjpg") == false) + if (startsWith(mjpeg_url, "http") && hasEnding(mjpeg_url, ".mjpg") == false) { // The filename doesn't end with ".mjpg" so the downstream processing may not treat it as such // OpenCV doesn't have a way to force the rendering, other than via URL path. So, let's add it to the URL