]> git.sesse.net Git - casparcg/commitdiff
fixes an issue with negative scale in mixer fill commands. it now does what one expec...
authorniklaspandersson <niklas.p.andersson@svt.se>
Mon, 3 Jun 2013 15:31:05 +0000 (17:31 +0200)
committerniklaspandersson <niklas.p.andersson@svt.se>
Mon, 3 Jun 2013 15:31:05 +0000 (17:31 +0200)
core/mixer/image/image_kernel.cpp
protocol/amcp/AMCPCommandsImpl.cpp
protocol/amcp/AMCPProtocolStrategy.cpp

index 4529b8f7918ef2b9df0b2daf54e0e9e34a51d959..41d6a6ff8d3e031f137534e6da9723bd7520dbc0 100644 (file)
@@ -224,6 +224,10 @@ struct image_kernel::implementation : boost::noncopyable
                \r
                // Draw\r
                                \r
+               /*\r
+                       GL_TEXTURE0 are texture coordinates to the source material, what will be rendered with this call. These are always set to the whole thing.\r
+                       GL_TEXTURE1 are texture coordinates to background- / key-material, that which will have to be taken in consideration when blending. These are set to the rectangle over which the source will be rendered\r
+               */\r
                glBegin(GL_QUADS);\r
                        glMultiTexCoord2d(GL_TEXTURE0, 0.0, 0.0); glMultiTexCoord2d(GL_TEXTURE1,  f_p[0]        ,  f_p[1]        );             glVertex2d( f_p[0]        *2.0-1.0,  f_p[1]        *2.0-1.0);\r
                        glMultiTexCoord2d(GL_TEXTURE0, 1.0, 0.0); glMultiTexCoord2d(GL_TEXTURE1, (f_p[0]+f_s[0]),  f_p[1]        );             glVertex2d((f_p[0]+f_s[0])*2.0-1.0,  f_p[1]        *2.0-1.0);\r
index ec8367abe3055ef991a6f9606b7c24fda9ccd867..0f4bc0a71de14b0a3afe52efbd957f2626d1efcb 100644 (file)
@@ -474,10 +474,6 @@ bool MixerCommand::DoExecute()
                                transform.fill_translation[1]   = y;\r
                                transform.fill_scale[0]                 = x_s;\r
                                transform.fill_scale[1]                 = y_s;\r
-                               transform.clip_translation[0]   = x;\r
-                               transform.clip_translation[1]   = y;\r
-                               transform.clip_scale[0]                 = x_s;\r
-                               transform.clip_scale[1]                 = y_s;\r
                                return transform;\r
                        }, duration, tween));\r
                }\r
@@ -489,6 +485,11 @@ bool MixerCommand::DoExecute()
                        double y        = boost::lexical_cast<double>(_parameters.at(2));\r
                        double x_s      = boost::lexical_cast<double>(_parameters.at(3));\r
                        double y_s      = boost::lexical_cast<double>(_parameters.at(4));\r
+                       if(x_s < 0 || y_s < 0)\r
+                       {\r
+                               SetReplyString(L"403 MIXER ERROR\r\n");\r
+                               return false;\r
+                       }\r
 \r
                        transforms.push_back(stage::transform_tuple_t(GetLayerIndex(), [=](frame_transform transform) -> frame_transform\r
                        {\r
index 638406cd24c3f3a3390bd7a0cb549eea2e8cd095..d89bd71abcc0a4e56dd2074c9aaacab50a0623a4 100644 (file)
@@ -89,7 +89,7 @@ void AMCPProtocolStrategy::Parse(const TCHAR* pData, int charCount, ClientInfoPt
        size_t oldLength = pClientInfo->currentMessage_.length();\r
 \r
        if(pClientInfo->currentMessage_.capacity() < (oldLength + charCount))\r
-               pClientInfo->currentMessage_.reserve(8192 * 4);\r
+               pClientInfo->currentMessage_.reserve(oldLength + 8192 * 4);\r
 \r
        pClientInfo->currentMessage_.append(pData, charCount);\r
 \r