GNOME Bugzilla – Bug 794842
v4l2bufferpool: Should never return EOS unless it's a M2M device
Last modified: 2018-07-14 03:10:16 UTC
Just to help a little the kernel dev, it would be nice to warn if an empty output buffer is detected as a legacy EOS marker. Newly written driver should not use this way of signalling EOS and it's a really easy mistake to do to forget to set the output buffer payload size. So the new warning should mention that an empty buffer was dequeued, and that this will trigger EOS.
In fact it was reported today that with a C920, when streaming H264, it happens that the payload size is 0, shutting down the camera. So this really cause bugs.
Created attachment 373052 [details] [review] v4l2: Add a macro to check for M2M
Created attachment 373053 [details] [review] v4l2bufferpool: Only return eos for M2M devices This will avoid sending EOS on v4l2src when a driver sends an empty buffers. This case would be a bug in the driver, but yet the camera should keep running. This also removes the check for corrupted buffers, as this check is already done later.
Attachment 373052 [details] pushed as 3735e57 - v4l2: Add a macro to check for M2M Attachment 373053 [details] pushed as 3b364ce - v4l2bufferpool: Only return eos for M2M devices
remote: sending e-mail for 411fdff38b5683927548bc90e6c5d4c3b1a1d8b4 remote: sending e-mail for a57c419101ba59f5b78448afce5a67f311b4e909