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:23:17 +0000 |
commit | a99b790e3553874ce2506f7e0de8ed298a742861 (patch) | |
tree | 76b47cde3187a16a336d939b5817672998ce69f6 | |
parent | 327515a35f03d4a315dada57cb20c97e7071718c (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
Conflicts:
sys/v4l2/gstv4l2bufferpool.c
-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 ed6a25ce7..b07faa799 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -1093,6 +1093,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; + /* set top/bottom field first if v4l2_buffer has the information */ switch (group->buffer.field) { case V4L2_FIELD_NONE: @@ -1137,6 +1141,7 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) GST_BUFFER_TIMESTAMP (outbuf) = timestamp; +done: *buffer = outbuf; return GST_FLOW_OK; |