Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_last_buffer):
Don't hold the object lock when unreffing a buffer because it could
cause a deadlock when the finalize function wants to grab the object
lock too. Fixes #495133.
2007-11-09 Wim Taymans <wim.taymans@gmail.com>
+ * libs/gst/base/gstbasesink.c: (gst_base_sink_set_last_buffer):
+ Don't hold the object lock when unreffing a buffer because it could
+ cause a deadlock when the finalize function wants to grab the object
+ lock too. Fixes #495133.
+
+2007-11-09 Wim Taymans <wim.taymans@gmail.com>
+
* gst/gstsegment.c: (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
Also accumulate time correctly when doing reverse playback. Fixes
static void
gst_base_sink_set_last_buffer (GstBaseSink * sink, GstBuffer * buffer)
{
+ GstBuffer *old;
+
+ if (buffer)
+ gst_buffer_ref (buffer);
+
GST_OBJECT_LOCK (sink);
- gst_buffer_replace (&sink->priv->last_buffer, buffer);
+ old = sink->priv->last_buffer;
+ sink->priv->last_buffer = buffer;
GST_OBJECT_UNLOCK (sink);
+
+ if (old)
+ gst_buffer_unref (old);
}
/**