summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/v4l2_videodevice.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index cb52d4ce..12c09dc7 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1391,6 +1391,16 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)
struct v4l2_buffer buf = {};
int ret;
+ /*
+ * Pipeline handlers should not requeue buffers after releasing the
+ * buffers on the device. Any occurence of this error should be fixed
+ * in the pipeline handler directly.
+ */
+ if (!cache_) {
+ LOG(V4L2, Fatal) << "No BufferCache available to queue.";
+ return -ENOENT;
+ }
+
ret = cache_->get(*buffer);
if (ret < 0)
return ret;