v4l2bufferpool: use FLOW_LAST_BUFFER

This uses the GST_V4L2_FLOW_LAST_BUFFER alias instead of
GST_FLOW_CUSTOM_SUCCESS to make the code more readable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
This commit is contained in:
Nicolas Dufresne 2021-02-04 10:10:34 -05:00
parent 1b1ad32b90
commit 954e38a6b9

View file

@ -1134,7 +1134,7 @@ select_error:
return GST_FLOW_ERROR;
}
no_buffers:
return GST_FLOW_CUSTOM_SUCCESS;
return GST_V4L2_FLOW_LAST_BUFFER;
}
static GstFlowReturn
@ -1236,7 +1236,7 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer,
if ((res = gst_v4l2_buffer_pool_poll (pool, wait)) < GST_FLOW_OK)
goto poll_failed;
if (res == GST_FLOW_CUSTOM_SUCCESS) {
if (res == GST_V4L2_FLOW_LAST_BUFFER) {
GST_LOG_OBJECT (pool, "nothing to dequeue");
goto done;
}