From ecfbaf58a502ddfc0c605bba9e30f78d4609ea4d Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 4 Apr 2010 06:24:41 -0500 Subject: [PATCH] v4l2: clear flags before reusing buffer from buffer pool note: this really only affects v4l2sink since gst_v4l2_buffer_pool_get() is only called once per buffer in the v4l2src case (in gst_v4l2src_buffer_pool_activate()) --- sys/v4l2/gstv4l2bufferpool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index cf439095f6..a981c68db7 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -463,8 +463,10 @@ gst_v4l2_buffer_pool_get (GstV4l2BufferPool * pool) { GstV4l2Buffer *buf = g_async_queue_try_pop (pool->avail_buffers); - if (buf) + if (buf) { GST_BUFFER_SIZE (buf) = buf->vbuffer.length; + GST_BUFFER_FLAG_UNSET (buf, 0xffffffff); + } pool->running = TRUE;