mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
v4l2: bufferpool: Avoid warnings on empty last buffer
Some drivers will push an buffer flagged LAST but empty. In decoder case, this results in an "producing too many buffer" warning, even though the result is entirely correct. Detect this case in order to signal EOS earlier and avoid this warning. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5286>
This commit is contained in:
parent
65350b601e
commit
353cb2da92
1 changed files with 6 additions and 0 deletions
|
@ -1280,6 +1280,12 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer,
|
||||||
group->buffer.index);
|
group->buffer.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (group->buffer.flags & V4L2_BUF_FLAG_LAST &&
|
||||||
|
group->planes[0].bytesused == 0) {
|
||||||
|
GST_DEBUG_OBJECT (pool, "Empty last buffer, signalling eos.");
|
||||||
|
goto eos;
|
||||||
|
}
|
||||||
|
|
||||||
outbuf = pool->buffers[group->buffer.index];
|
outbuf = pool->buffers[group->buffer.index];
|
||||||
if (outbuf == NULL)
|
if (outbuf == NULL)
|
||||||
goto no_buffer;
|
goto no_buffer;
|
||||||
|
|
Loading…
Reference in a new issue