From b9c366f117a171c591d16b8a7a69bbf532aa0e5c Mon Sep 17 00:00:00 2001 From: Helge Norberg Date: Tue, 24 Jan 2017 14:45:50 +0100 Subject: [PATCH] [html_producer] #525 Fixed bug where only URL:s with . in them where recognized. --- CHANGELOG | 2 ++ modules/html/producer/html_producer.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6aae7c50f..7dbc5555f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,6 +41,8 @@ Producers decode the first frame. o Framerate producer: + Fixed bug when INFO was used on a not yet playing framerate producer. + o HTML producer: + + Fixed bug where only URL:s with . in them where recognized. Mixer ----- diff --git a/modules/html/producer/html_producer.cpp b/modules/html/producer/html_producer.cpp index 78ca18fc7..256b7b217 100644 --- a/modules/html/producer/html_producer.cpp +++ b/modules/html/producer/html_producer.cpp @@ -599,17 +599,18 @@ spl::shared_ptr create_producer( const core::frame_producer_dependencies& dependencies, const std::vector& params) { - const auto filename = env::template_folder() + params.at(0) + L".html"; - const auto found_filename = find_case_insensitive(filename); + const auto filename = env::template_folder() + params.at(0) + L".html"; + const auto found_filename = find_case_insensitive(filename); + const auto html_prefix = boost::iequals(params.at(0), L"[HTML]"); - if (!found_filename && !boost::iequals(params.at(0), L"[HTML]")) + if (!found_filename && !html_prefix) return core::frame_producer::empty(); const auto url = found_filename ? L"file://" + *found_filename : params.at(1); - if (!boost::algorithm::contains(url, ".") || boost::algorithm::ends_with(url, "_A") || boost::algorithm::ends_with(url, "_ALPHA")) + if (!html_prefix || boost::algorithm::ends_with(url, "_A") || boost::algorithm::ends_with(url, "_ALPHA")) return core::frame_producer::empty(); return core::create_destroy_proxy(spl::make_shared( -- 2.39.2