gst_harness_pull (GstHarness * h)
{
GstHarnessPrivate *priv = h->priv;
+ GstBuffer *buf = (GstBuffer *) g_async_queue_timeout_pop (priv->buffer_queue,
+ G_USEC_PER_SEC * 60);
if (priv->blocking_push_mode) {
g_mutex_lock (&priv->blocking_push_mutex);
g_mutex_unlock (&priv->blocking_push_mutex);
}
- return (GstBuffer *) g_async_queue_timeout_pop (priv->buffer_queue,
- G_USEC_PER_SEC * 60);
+ return buf;
}
/**
gst_harness_try_pull (GstHarness * h)
{
GstHarnessPrivate *priv = h->priv;
+ GstBuffer *buf = (GstBuffer *) g_async_queue_try_pop (priv->buffer_queue);
if (priv->blocking_push_mode) {
g_mutex_lock (&priv->blocking_push_mutex);
g_mutex_unlock (&priv->blocking_push_mutex);
}
- return (GstBuffer *) g_async_queue_try_pop (priv->buffer_queue);
+ return buf;
}
/**