gst/gstevent.c: Reference source object when copying events, since it'll be dereferenced on event dereferencing as well.

Original commit message from CVS:
* gst/gstevent.c: (_gst_event_copy):
Reference source object when copying events, since it'll be
dereferenced on event dereferencing as well.
This commit is contained in:
Ronald S. Bultje 2005-01-08 21:33:03 +00:00
parent 66d5da4f17
commit 58efb5a941
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-01-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstevent.c: (_gst_event_copy):
Reference source object when copying events, since it'll be
dereferenced on event dereferencing as well.
2005-01-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* docs/gst/gstreamer-sections.txt:

View file

@ -69,6 +69,9 @@ _gst_event_copy (GstEvent * event)
#endif
memcpy (copy, event, sizeof (GstEvent));
if (GST_EVENT_SRC (copy)) {
gst_object_ref (GST_EVENT_SRC (copy));
}
/* FIXME copy/ref additional fields */
switch (GST_EVENT_TYPE (event)) {