v4l2bufferpool: use FLOW_LAST_BUFFER
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 4 Feb 2021 15:10:34 +0000 (10:10 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 19 Feb 2021 20:22:47 +0000 (15:22 -0500)
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>

sys/v4l2/gstv4l2bufferpool.c

index 52c9916..21efd35 100644 (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;
   }