summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2015-12-01 18:20:23 +0100
committerWim Taymans <wtaymans@redhat.com>2015-12-14 09:43:02 +0100
commit0355f897e28f92eb38045c1b22df9e1400b5b5a7 (patch)
treea1ac7c254ac4c8b9ce72ee8551c9e193f820e035
parentb187e66f6537b69b3befc745dfe104eb6d25a01c (diff)
downloadgstreamer-plugins-good-0355f897e28f92eb38045c1b22df9e1400b5b5a7.tar.gz
v4l2bufferpool: don't block when resurecting a buffer
When we are resurecting a buffer, don't block. instead let us copy a buffer.
-rw-r--r--sys/v4l2/gstv4l2bufferpool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index 6c89bd191..fc456218f 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -676,7 +676,8 @@ gst_v4l2_buffer_pool_resurect_buffer (GstV4l2BufferPool * pool)
GST_DEBUG_OBJECT (pool, "A buffer was lost, reallocating it");
params.flags =
- (GstBufferPoolAcquireFlags) GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_RESURRECT;
+ (GstBufferPoolAcquireFlags) GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_RESURRECT |
+ GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT;
ret =
gst_buffer_pool_acquire_buffer (GST_BUFFER_POOL (pool), &buffer, &params);
@@ -1765,6 +1766,7 @@ gst_v4l2_buffer_pool_process (GstV4l2BufferPool * pool, GstBuffer ** buf)
*buf = copy;
}
+ ret = GST_FLOW_OK;
/* nothing, data was inside the buffer when we did _acquire() */
goto done;
}