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())
This commit is contained in:
Rob Clark 2010-04-04 06:24:41 -05:00
parent e24cfa7250
commit ecfbaf58a5

View file

@ -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;