mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix some data races (#890)
This commit is contained in:
@@ -144,7 +144,7 @@ PyObject* EffectModule::wrapSetColor(PyObject *self, PyObject *args)
|
||||
{
|
||||
getEffect()->_colors.fill(color);
|
||||
QVector<ColorRgb> _cQV = getEffect()->_colors;
|
||||
getEffect()->setInput(getEffect()->_priority, std::vector<ColorRgb>( _cQV.begin(), _cQV.end() ), timeout, false);
|
||||
emit getEffect()->setInput(getEffect()->_priority, std::vector<ColorRgb>( _cQV.begin(), _cQV.end() ), timeout, false);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -163,7 +163,7 @@ PyObject* EffectModule::wrapSetColor(PyObject *self, PyObject *args)
|
||||
char * data = PyByteArray_AS_STRING(bytearray);
|
||||
memcpy(getEffect()->_colors.data(), data, length);
|
||||
QVector<ColorRgb> _cQV = getEffect()->_colors;
|
||||
getEffect()->setInput(getEffect()->_priority, std::vector<ColorRgb>( _cQV.begin(), _cQV.end() ), timeout, false);
|
||||
emit getEffect()->setInput(getEffect()->_priority, std::vector<ColorRgb>( _cQV.begin(), _cQV.end() ), timeout, false);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
else
|
||||
@@ -218,7 +218,7 @@ PyObject* EffectModule::wrapSetImage(PyObject *self, PyObject *args)
|
||||
Image<ColorRgb> image(width, height);
|
||||
char * data = PyByteArray_AS_STRING(bytearray);
|
||||
memcpy(image.memptr(), data, length);
|
||||
getEffect()->setInputImage(getEffect()->_priority, image, timeout, false);
|
||||
emit getEffect()->setInputImage(getEffect()->_priority, image, timeout, false);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
else
|
||||
@@ -375,7 +375,7 @@ PyObject* EffectModule::wrapImageShow(PyObject *self, PyObject *args)
|
||||
}
|
||||
|
||||
memcpy(image.memptr(), binaryImage.data(), binaryImage.size());
|
||||
getEffect()->setInputImage(getEffect()->_priority, image, timeout, false);
|
||||
emit getEffect()->setInputImage(getEffect()->_priority, image, timeout, false);
|
||||
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user