GST_PAD_SET_FLUSHING (pad);
- /* FIXME 0.11: Store this directly in the instance struct */
- pad->stream_rec_lock = g_slice_new (GStaticRecMutex);
- g_static_rec_mutex_init (pad->stream_rec_lock);
+ g_static_rec_mutex_init (&pad->stream_rec_lock);
pad->block_cond = g_cond_new ();
gst_object_unref (task);
}
- if (pad->stream_rec_lock) {
- g_static_rec_mutex_free (pad->stream_rec_lock);
- g_slice_free (GStaticRecMutex, pad->stream_rec_lock);
- pad->stream_rec_lock = NULL;
- }
- if (pad->block_cond) {
- g_cond_free (pad->block_cond);
- pad->block_cond = NULL;
- }
+ g_static_rec_mutex_free (&pad->stream_rec_lock);
+ g_cond_free (pad->block_cond);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/*< public >*/ /* with STREAM_LOCK */
/* streaming rec_lock */
- GStaticRecMutex *stream_rec_lock;
+ GStaticRecMutex stream_rec_lock;
GstTask *task;
/*< public >*/ /* with LOCK */
* Get the stream lock of @pad. The stream lock is protecting the
* resources used in the data processing functions of @pad.
*/
-#define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
+#define GST_PAD_GET_STREAM_LOCK(pad) (&(GST_PAD_CAST(pad)->stream_rec_lock))
/**
* GST_PAD_STREAM_LOCK:
* @pad: a #GstPad