]> git.sesse.net Git - casparcg/commitdiff
2.1.0: -ffmpeg_consumer: Fixed param parsing. Fixed REMOVE 1 FILE.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 28 Mar 2012 21:01:19 +0000 (21:01 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 28 Mar 2012 21:01:19 +0000 (21:01 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@2775 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

modules/ffmpeg/consumer/ffmpeg_consumer.cpp

index f2d28bb8b07e7586257bfc80ce77d8f0304fb6eb..0bc5093b41ffa41fb315b1eacdc21af46e886124 100644 (file)
@@ -149,10 +149,10 @@ struct output_format
                        return set_opt(o.name, o.value);\r
                });\r
                \r
-               if(vcodec == CODEC_ID_NONE)\r
+               if(vcodec == CODEC_ID_NONE && format)\r
                        vcodec = format->video_codec;\r
 \r
-               if(acodec == CODEC_ID_NONE)\r
+               if(acodec == CODEC_ID_NONE && format)\r
                        acodec = format->audio_codec;\r
                \r
                if(vcodec == CODEC_ID_NONE)\r
@@ -789,7 +789,7 @@ spl::shared_ptr<core::frame_consumer> create_consumer(const std::vector<std::wst
 {\r
        auto str = std::accumulate(params.begin(), params.end(), std::wstring(), [](const std::wstring& lhs, const std::wstring& rhs) {return lhs + L" " + rhs;});\r
        \r
-       boost::wregex path_exp(L"(FILE)? (?<PATH>.+\\..+).*", boost::regex::icase);\r
+       boost::wregex path_exp(L"\\s*FILE(\\s(?<PATH>.+\\.[^\\s]+))?.*", boost::regex::icase);\r
 \r
        boost::wsmatch path;\r
        if(!boost::regex_match(str, path, path_exp))\r