mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
Do not declare mix declaration and code
This commit is contained in:
parent
10707f437f
commit
efbce60285
1 changed files with 10 additions and 10 deletions
|
@ -761,7 +761,7 @@ static PyObject *
|
||||||
_gst_memory_override_map (PyObject * self, PyObject * args)
|
_gst_memory_override_map (PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
PyTypeObject *gst_memory_type;
|
PyTypeObject *gst_memory_type;
|
||||||
PyObject *py_memory, *py_mapinfo;
|
PyObject *py_memory, *py_mapinfo, *success;
|
||||||
int flags;
|
int flags;
|
||||||
GstMemory *memory;
|
GstMemory *memory;
|
||||||
GstMapInfo *mapinfo;
|
GstMapInfo *mapinfo;
|
||||||
|
@ -787,7 +787,7 @@ _gst_memory_override_map (PyObject * self, PyObject * args)
|
||||||
return Py_False;
|
return Py_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *success = _remap (mapinfo, py_mapinfo);
|
success = _remap (mapinfo, py_mapinfo);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
gst_memory_unmap (memory, mapinfo);
|
gst_memory_unmap (memory, mapinfo);
|
||||||
g_free (mapinfo);
|
g_free (mapinfo);
|
||||||
|
@ -799,7 +799,7 @@ static PyObject *
|
||||||
_gst_memory_override_unmap (PyObject * self, PyObject * args)
|
_gst_memory_override_unmap (PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
PyTypeObject *gst_memory_type;
|
PyTypeObject *gst_memory_type;
|
||||||
PyObject *py_memory, *py_cmapinfo, *py_mapinfo, *mview;
|
PyObject *py_memory, *py_cmapinfo, *py_mapinfo, *mview, *ret;
|
||||||
GstMemory *memory;
|
GstMemory *memory;
|
||||||
GstMapInfo *mapinfo;
|
GstMapInfo *mapinfo;
|
||||||
|
|
||||||
|
@ -826,7 +826,7 @@ _gst_memory_override_unmap (PyObject * self, PyObject * args)
|
||||||
mapinfo = PyCapsule_GetPointer (py_cmapinfo, "__cmapinfo");
|
mapinfo = PyCapsule_GetPointer (py_cmapinfo, "__cmapinfo");
|
||||||
|
|
||||||
/* Call the memoryview.release() Python method, there is no C API */
|
/* Call the memoryview.release() Python method, there is no C API */
|
||||||
PyObject *ret = PyObject_CallMethod (mview, "release", NULL);
|
ret = PyObject_CallMethod (mview, "release", NULL);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto err;
|
goto err;
|
||||||
Py_DECREF (ret);
|
Py_DECREF (ret);
|
||||||
|
@ -849,7 +849,7 @@ static PyObject *
|
||||||
_gst_buffer_override_map_range (PyObject * self, PyObject * args)
|
_gst_buffer_override_map_range (PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
PyTypeObject *gst_buffer_type;
|
PyTypeObject *gst_buffer_type;
|
||||||
PyObject *py_buffer, *py_mapinfo;
|
PyObject *py_buffer, *py_mapinfo, *success;
|
||||||
int flags, range;
|
int flags, range;
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
@ -876,7 +876,7 @@ _gst_buffer_override_map_range (PyObject * self, PyObject * args)
|
||||||
return Py_False;
|
return Py_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *success = _remap (mapinfo, py_mapinfo);
|
success = _remap (mapinfo, py_mapinfo);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
gst_buffer_unmap (buffer, mapinfo);
|
gst_buffer_unmap (buffer, mapinfo);
|
||||||
g_free (mapinfo);
|
g_free (mapinfo);
|
||||||
|
@ -888,7 +888,7 @@ static PyObject *
|
||||||
_gst_buffer_override_map (PyObject * self, PyObject * args)
|
_gst_buffer_override_map (PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
PyTypeObject *gst_buffer_type;
|
PyTypeObject *gst_buffer_type;
|
||||||
PyObject *py_buffer, *py_mapinfo;
|
PyObject *py_buffer, *py_mapinfo, *success;
|
||||||
int flags;
|
int flags;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstMapInfo *mapinfo;
|
GstMapInfo *mapinfo;
|
||||||
|
@ -916,7 +916,7 @@ _gst_buffer_override_map (PyObject * self, PyObject * args)
|
||||||
return Py_False;
|
return Py_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *success = _remap (mapinfo, py_mapinfo);
|
success = _remap (mapinfo, py_mapinfo);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
gst_buffer_unmap (buffer, mapinfo);
|
gst_buffer_unmap (buffer, mapinfo);
|
||||||
g_free (mapinfo);
|
g_free (mapinfo);
|
||||||
|
@ -928,7 +928,7 @@ static PyObject *
|
||||||
_gst_buffer_override_unmap (PyObject * self, PyObject * args)
|
_gst_buffer_override_unmap (PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
PyTypeObject *gst_buf_type;
|
PyTypeObject *gst_buf_type;
|
||||||
PyObject *py_buffer, *py_cmapinfo, *py_mapinfo, *mview;
|
PyObject *py_buffer, *py_cmapinfo, *py_mapinfo, *mview, *ret;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstMapInfo *mapinfo;
|
GstMapInfo *mapinfo;
|
||||||
|
|
||||||
|
@ -955,7 +955,7 @@ _gst_buffer_override_unmap (PyObject * self, PyObject * args)
|
||||||
mapinfo = PyCapsule_GetPointer (py_cmapinfo, "__cmapinfo");
|
mapinfo = PyCapsule_GetPointer (py_cmapinfo, "__cmapinfo");
|
||||||
|
|
||||||
/* Call the memoryview.release() Python method, there is no C API */
|
/* Call the memoryview.release() Python method, there is no C API */
|
||||||
PyObject *ret = PyObject_CallMethod (mview, "release", NULL);
|
ret = PyObject_CallMethod (mview, "release", NULL);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
GST_ERROR ("Could not call `.release()` on the memoryview.");
|
GST_ERROR ("Could not call `.release()` on the memoryview.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue