mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
gst/gstbus.override: properly unref the message python wrapper...
Original commit message from CVS: * gst/gstbus.override: (bus_sync_handler),(bus_handler): properly unref the message python wrapper...
This commit is contained in:
parent
e6ee173eae
commit
816af777c3
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-07-13 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstbus.override: (bus_sync_handler),(bus_handler):
|
||||||
|
properly unref the message python wrapper...
|
||||||
|
|
||||||
2005-07-13 Andy Wingo <wingo@pobox.com>
|
2005-07-13 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
* examples/pipeline-tester (Window.on_message): Handle errors.
|
* examples/pipeline-tester (Window.on_message): Handle errors.
|
||||||
|
|
|
@ -63,7 +63,7 @@ bus_sync_handler (GstBus *bus, GstMessage *message, gpointer user_data)
|
||||||
res = GST_BUS_PASS;
|
res = GST_BUS_PASS;
|
||||||
Py_DECREF (ret);
|
Py_DECREF (ret);
|
||||||
}
|
}
|
||||||
|
Py_DECREF(py_msg);
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
|
|
||||||
pyg_gil_state_release(state);
|
pyg_gil_state_release(state);
|
||||||
|
@ -77,7 +77,7 @@ bus_handler (GstBus *bus, GstMessage *message, gpointer user_data)
|
||||||
PyGILState_STATE state;
|
PyGILState_STATE state;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
PyObject *py_userdata;
|
PyObject *py_userdata;
|
||||||
PyObject *py_msg;
|
PyObject *py_msg;
|
||||||
PyObject *callback, *args;
|
PyObject *callback, *args;
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
gint i,len;
|
gint i,len;
|
||||||
|
@ -87,7 +87,7 @@ bus_handler (GstBus *bus, GstMessage *message, gpointer user_data)
|
||||||
state = pyg_gil_state_ensure();
|
state = pyg_gil_state_ensure();
|
||||||
|
|
||||||
py_userdata = (PyObject *) user_data;
|
py_userdata = (PyObject *) user_data;
|
||||||
py_msg = pygstminiobject_new(GST_MINI_OBJECT(message));
|
py_msg = pygstminiobject_new(GST_MINI_OBJECT(message));
|
||||||
callback = PyTuple_GetItem(py_userdata, 0);
|
callback = PyTuple_GetItem(py_userdata, 0);
|
||||||
args = Py_BuildValue("(NN)",
|
args = Py_BuildValue("(NN)",
|
||||||
pygobject_new(G_OBJECT(bus)),
|
pygobject_new(G_OBJECT(bus)),
|
||||||
|
@ -113,6 +113,7 @@ bus_handler (GstBus *bus, GstMessage *message, gpointer user_data)
|
||||||
res = PyObject_IsTrue(ret);
|
res = PyObject_IsTrue(ret);
|
||||||
Py_DECREF(ret);
|
Py_DECREF(ret);
|
||||||
}
|
}
|
||||||
|
Py_DECREF(py_msg);
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
|
|
||||||
pyg_gil_state_release(state);
|
pyg_gil_state_release(state);
|
||||||
|
|
Loading…
Reference in a new issue