Index: gst/gstevent.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstevent.h,v
retrieving revision 1.90
diff -u -p -r1.90 gstevent.h
--- gst/gstevent.h	1 Dec 2005 12:00:56 -0000	1.90
+++ gst/gstevent.h	14 Jan 2006 21:47:03 -0000
@@ -206,6 +206,22 @@ typedef struct _GstEventClass GstEventCl
 #define GST_EVENT_IS_SERIALIZED(ev)	!!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_SERIALIZED)
 
 /**
+ * gst_event_replace:
+ * @old_event: pointer to a pointer to a #GstEvent to be replaced.
+ * @new_event: pointer to a #GstEvent that will replace the event pointed to 
+ *        by @old_event.
+ *
+ * Modifies a pointer to a #GstEvent to point to a different #GstEvent. The
+ * modification is done atomically (so this is useful for ensuring thread safety
+ * in some cases), and the reference counts are updated appropriately (the old 
+ * event is unreffed, the new one is reffed).
+ *
+ * Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
+ */
+#define		gst_event_replace(old_event,new_event) \
+    gst_mini_object_replace ((GstMiniObject **)(old_event), GST_MINI_OBJECT (new_event))
+
+/**
  * GstSeekType:
  * @GST_SEEK_TYPE_NONE: no change in position is required
  * @GST_SEEK_TYPE_CUR: change relative to current position
Index: docs/gst/gstreamer-sections.txt
===================================================================
RCS file: /cvs/gstreamer/gstreamer/docs/gst/gstreamer-sections.txt,v
retrieving revision 1.240
diff -u -p -r1.240 gstreamer-sections.txt
--- docs/gst/gstreamer-sections.txt	13 Jan 2006 14:21:48 -0000	1.240
+++ docs/gst/gstreamer-sections.txt	14 Jan 2006 21:47:04 -0000
@@ -611,10 +611,11 @@ gst_event_parse_qos
 gst_event_parse_seek
 gst_event_parse_tag
 gst_event_ref
+gst_event_unref
+gst_event_replace
 gst_event_type_get_flags
 gst_event_type_get_name
 gst_event_type_to_quark
-gst_event_unref
 <SUBSECTION Standard>
 GstEventClass
 GST_EVENT
