v4l2bufferpool: Cleanup uneeded check and cases
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 3 Dec 2014 21:40:49 +0000 (16:40 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 4 Dec 2014 22:00:25 +0000 (17:00 -0500)
There is nothing in between the break and the "done:" anymore, plus
USERPTR and DMABUF_IMPORT case is exactly the same.

sys/v4l2/gstv4l2bufferpool.c

index 340044ef525d77a86c9fd4f049b19e572e4e27c4..55d3a102f67c6ade2c3a9f22cc0423ff35c365a0 100644 (file)
@@ -1188,20 +1188,13 @@ gst_v4l2_buffer_pool_acquire_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
         }
         case GST_V4L2_IO_DMABUF:
         case GST_V4L2_IO_MMAP:
+        case GST_V4L2_IO_USERPTR:
+        case GST_V4L2_IO_DMABUF_IMPORT:
         {
           /* just dequeue a buffer, we basically use the queue of v4l2 as the
            * storage for our buffers. This function does poll first so we can
            * interrupt it fine. */
           ret = gst_v4l2_buffer_pool_dqbuf (pool, buffer);
-          if (G_UNLIKELY (ret != GST_FLOW_OK))
-            goto done;
-          break;
-        }
-        case GST_V4L2_IO_USERPTR:
-        case GST_V4L2_IO_DMABUF_IMPORT:
-        {
-          /* dequeue filled buffer */
-          ret = gst_v4l2_buffer_pool_dqbuf (pool, buffer);
           break;
         }
         default: