{
gint length;
gboolean have_event;
+ guint t;
GST_PREROLL_LOCK (pad);
/* push object on the queue */
/* have to release STREAM_LOCK as we cannot take the STATE_LOCK
* inside the STREAM_LOCK */
- GST_STREAM_UNLOCK (pad);
+ t = GST_STREAM_UNLOCK_FULL (pad);
/* now we commit our state */
GST_STATE_LOCK (basesink);
GST_STATE_UNLOCK (basesink);
/* reacquire stream lock, pad could be flushing now */
- GST_STREAM_LOCK (pad);
+ GST_STREAM_LOCK_FULL (pad, t);
GST_LOCK (pad);
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
#define GST_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_STREAM_GET_LOCK(pad)))
#define GST_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_STREAM_GET_LOCK(pad)))
#define GST_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_STREAM_GET_LOCK(pad)))
+#define GST_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_STREAM_GET_LOCK(pad)))
+#define GST_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_STREAM_GET_LOCK(pad), t))
#define GST_PREROLL_GET_LOCK(pad) (GST_PAD_CAST(pad)->preroll_lock)
#define GST_PREROLL_LOCK(pad) (g_mutex_lock(GST_PREROLL_GET_LOCK(pad)))
{
gint length;
gboolean have_event;
+ guint t;
GST_PREROLL_LOCK (pad);
/* push object on the queue */
/* have to release STREAM_LOCK as we cannot take the STATE_LOCK
* inside the STREAM_LOCK */
- GST_STREAM_UNLOCK (pad);
+ t = GST_STREAM_UNLOCK_FULL (pad);
/* now we commit our state */
GST_STATE_LOCK (basesink);
GST_STATE_UNLOCK (basesink);
/* reacquire stream lock, pad could be flushing now */
- GST_STREAM_LOCK (pad);
+ GST_STREAM_LOCK_FULL (pad, t);
GST_LOCK (pad);
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))