mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
v4l2src: Ignore non-increasing sequence number
With older kernel, older driver or just broken drivers, the sequence number may not be increasing. This simply ignore the sequence in this case. This would otherwise miss-leading large amount of lost frame being reported. Fixes #729 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/598>
This commit is contained in:
parent
8a8c8afc86
commit
bfb1506381
1 changed files with 3 additions and 1 deletions
|
@ -978,7 +978,9 @@ retry:
|
|||
/* use generated offset values only if there are not already valid ones
|
||||
* set by the v4l2 device */
|
||||
if (!GST_BUFFER_OFFSET_IS_VALID (*buf)
|
||||
|| !GST_BUFFER_OFFSET_END_IS_VALID (*buf)) {
|
||||
|| !GST_BUFFER_OFFSET_END_IS_VALID (*buf)
|
||||
|| GST_BUFFER_OFFSET (*buf) <=
|
||||
(v4l2src->offset - v4l2src->renegotiation_adjust)) {
|
||||
GST_BUFFER_OFFSET (*buf) = v4l2src->offset;
|
||||
GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset + 1;
|
||||
if (!half_frame || !v4l2src->next_offset_same)
|
||||
|
|
Loading…
Reference in a new issue