]> git.sesse.net Git - casparcg/commitdiff
#297 Fixed support for flash templates with spaces in the file name.
authorHelge Norberg <helge.norberg@gmail.com>
Mon, 11 Aug 2014 08:47:27 +0000 (10:47 +0200)
committerHelge Norberg <helge.norberg@gmail.com>
Mon, 11 Aug 2014 08:47:27 +0000 (10:47 +0200)
modules/flash/producer/cg_producer.cpp
protocol/amcp/AMCPCommandsImpl.cpp

index c91181a2061c28c0c0a97d68afd1d54d0ab65c19..85cd830f23e3c3db93287232c7863267e748325d 100644 (file)
@@ -118,7 +118,7 @@ public:
 \r
        boost::unique_future<std::wstring> call(const std::wstring& str)\r
        {               \r
-               static const boost::wregex add_exp                      (L"ADD (?<LAYER>\\d+) (?<FILENAME>[^\\s]+) (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?", boost::regex::perl|boost::regex::icase);\r
+               static const boost::wregex add_exp                      (L"ADD (?<LAYER>\\d+) \"(?<FILENAME>[^\"]*)\" (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex remove_exp           (L"REMOVE (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex play_exp                     (L"PLAY (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex stop_exp                     (L"STOP (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
index 2439657549158896229f0e19172bf121375f0171..e567a0bd26546559a1614871ec1d9929e03265a4 100644 (file)
@@ -1382,7 +1382,7 @@ bool CGCommand::DoExecuteAdd() {
 \r
        if(!fullFilename.empty())\r
        {\r
-               auto call = (boost::wformat(L"ADD %1% %2% %3% %4% %5%") % layer % filename % bDoStart % label % (std::wstring() + (pDataString ? pDataString : L""))).str();\r
+               auto call = (boost::wformat(L"ADD %1% \"%2%\" %3% %4% %5%") % layer % filename % bDoStart % label % (std::wstring() + (pDataString ? pDataString : L""))).str();\r
                auto producer = GetChannel()->stage()->foreground(GetLayerIndex(9999)).get();\r
 \r
                if(producer->print().find(L"flash") == std::string::npos)\r