Commit a70c226d authored by Edward Hervey's avatar Edward Hervey

gst/gstevent.override: gst_event_new_tag takes ownership of the GstTagList...

gst/gstevent.override: gst_event_new_tag takes ownership of the GstTagList given as argument, therefore make a copy b...

Original commit message from CVS:
* gst/gstevent.override:
gst_event_new_tag takes ownership of the GstTagList given
as argument, therefore make a copy before calling the
C function.
Fixes #534888
parent cf22542b
2008-05-26 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/gstevent.override:
gst_event_new_tag takes ownership of the GstTagList given
as argument, therefore make a copy before calling the
C function.
Fixes #534888
2008-05-17 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/extend/discoverer.py:
......
common @ 032f2d97
Subproject commit 3b3631082d04b426f450810e8836de94e9c5d60a
Subproject commit 032f2d973bd5c9a9b457cb5fc72d13dafe85c01e
......@@ -235,3 +235,29 @@ _wrap_gst_event_new_custom(PyObject *self, PyObject *args, PyObject *kwargs)
gst_mini_object_unref((GstMiniObject *)ret);
return py_ret;
}
%%
override gst_event_new_tag kwargs
static PyObject *
_wrap_gst_event_new_tag(PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "taglist", NULL };
GstTagList *taglist = NULL;
PyObject *py_taglist, *py_ret;
GstEvent *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:event_new_tag", kwlist, &py_taglist))
return NULL;
if (pyg_boxed_check(py_taglist, GST_TYPE_TAG_LIST))
taglist = pyg_boxed_get(py_taglist, GstTagList);
else {
PyErr_SetString(PyExc_TypeError, "taglist should be a GstTagList");
return NULL;
}
pyg_begin_allow_threads;
ret = gst_event_new_tag(gst_tag_list_copy(taglist));
pyg_end_allow_threads;
py_ret = pygstminiobject_new((GstMiniObject *)ret);
if (ret != NULL)
gst_mini_object_unref((GstMiniObject *)ret);
return py_ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment