From 58efb5a941645beb2fe1243da66df3932f11e635 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 8 Jan 2005 21:33:03 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ gst/gstevent.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index acd6b433ac..eaf7fb5137 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-08 Ronald S. Bultje + + * 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 * docs/gst/gstreamer-sections.txt: diff --git a/gst/gstevent.c b/gst/gstevent.c index a6ff14c3a8..5a64088b20 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -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)) {