After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745190 - v4l2: properly drop corrupted buffers
v4l2: properly drop corrupted buffers
Status: RESOLVED DUPLICATE of bug 740040
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2015-02-26 00:35 UTC by Aleix Conchillo Flaqué
Modified: 2015-02-26 02:17 UTC
See Also:
GNOME target: ---
GNOME version: ---

properly drop corrupted buffers (1012 bytes, patch)
2015-02-26 00:39 UTC, Aleix Conchillo Flaqué
none Details | Review
properly drop corrupted buffers fix up (1.13 KB, patch)
2015-02-26 00:50 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2015-02-26 00:35:26 UTC
I'm testing 4K video capture with a new capture device (4K to USB 3.0):

I'm getting some initial corrupted buffers which are not properly discarded by GStreamer and thus EOS happens.

The error I get is:

Driver returned a buffer with no payload, this most likely indicate a bug in the driver.
Comment 1 Aleix Conchillo Flaqué 2015-02-26 00:37:54 UTC
This is one of the buffers:

gstv4l2allocator.c:1284:gst_v4l2_allocator_dqbuf:<v4l2src0:pool:src:allocator> dequeued buffer 0 (flags 0x12045)

Where V4L2_BUF_FLAG_ERROR is set.
Comment 2 Aleix Conchillo Flaqué 2015-02-26 00:39:22 UTC
Created attachment 297939 [details] [review]
properly drop corrupted buffers

I think this does the trick.
Comment 3 Aleix Conchillo Flaqué 2015-02-26 00:50:48 UTC
Created attachment 297940 [details] [review]
properly drop corrupted buffers fix up

This one better, need to check the flag before the buffer is released.
Comment 4 Nicolas Dufresne (ndufresne) 2015-02-26 01:42:01 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 740040 ***
Comment 5 Nicolas Dufresne (ndufresne) 2015-02-26 01:50:29 UTC
For your interest, reopen the original bug, and attach your extra bug fix. Obviously checking flags on *buf is not correct, we need to check on tmp. But for a sane tracking, we need not to duplicate bugs. You could have found the original reference using git blame.
Comment 6 Aleix Conchillo Flaqué 2015-02-26 02:17:30 UTC
Sure, I'll do next time.