summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2012-08-20 09:52:32 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-09-13 16:29:47 +0200
commitc7e3d28fcdeb2f7a669f1cc07adf4028babb4426 (patch)
treecf7a6c4fda1ecaf8fda042f350fdfc4177d2c535
parente0df8c5810340cc6bf4e5247a6c50871476cc091 (diff)
downloadgst-plugins-good-c7e3d28fcdeb2f7a669f1cc07adf4028babb4426.tar.gz
gst-plugins-good-c7e3d28fcdeb2f7a669f1cc07adf4028babb4426.tar.xz
v4l2: fill out v4l2_buffer.bytesused field for v4l2sink
When queuing a buffer for a sink, bytesused must contain the actual amount of data. For a source, the driver must overwrite this, so it doesn't matter what is set here. https://bugzilla.gnome.org/show_bug.cgi?id=699598
-rw-r--r--sys/v4l2/gstv4l2bufferpool.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index fcf6a7f5c..b4582b625 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -647,9 +647,12 @@ gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstBuffer * buf)
}
index = meta->vbuffer.index;
+ meta->vbuffer.bytesused = gst_buffer_get_size (buf);
- GST_LOG_OBJECT (pool, "enqueue buffer %p, index:%d, queued:%d, flags:%08x",
- buf, index, pool->num_queued, meta->vbuffer.flags);
+ GST_LOG_OBJECT (pool,
+ "enqueue buffer %p, index:%d, queued:%d, flags:%08x used:%d",
+ buf, index, pool->num_queued, meta->vbuffer.flags,
+ meta->vbuffer.bytesused);
if (pool->buffers[index] != NULL)
goto already_queued;