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
This commit is contained in:
Nicolas Dufresne 2015-03-08 21:15:53 +00:00
parent 8965619f13
commit eeb4d2e8b1

View file

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