diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-03-08 21:15:53 +0000 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-03-08 21:15:53 +0000 |
commit | eeb4d2e8b1ca54263086857dd7776960bf7d4941 (patch) | |
tree | 9ea40f75ee491c894413dbf07f2d24cbdc75d62a | |
parent | 8965619f138aa4d67184f75157fb983fb6152dc6 (diff) |
v4l2bufferpool: Don't update buffer for OUTPUT
For output device, we should not update the buffer with flags and
timestamp when we dequeue. The information in the v4l2_buffer is not
meaningful and it breaks the case where the buffer is rendered at
multiple places.
https://bugzilla.gnome.org/show_bug.cgi?id=745438
-rw-r--r-- | sys/v4l2/gstv4l2bufferpool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 3f36cea70..4815336d5 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -1164,6 +1164,10 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) } #endif + /* Ignore timestamp and field for OUTPUT device */ + if (V4L2_TYPE_IS_OUTPUT (obj->type)) + goto done; + /* Check for driver bug in reporting feild */ if (group->buffer.field == V4L2_FIELD_ANY) { /* Only warn once to avoid the spamming */ @@ -1237,6 +1241,7 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) GST_BUFFER_TIMESTAMP (outbuf) = timestamp; +done: *buffer = outbuf; return GST_FLOW_OK; |