Skip to content

gst: prevent src task deadlock on exhausted buffer pool

Jakub Adam requested to merge xhaakon/libcamera:deadlock into gstreamer-v2

We shouldn't pause the task when there aren't any queued requests on the camera, since in that case requestCompleted() won't get called to resume the task again.

This can happen when a new buffer can't be acquired from an exhausted pool. We must wait for some buffer to get released before pausing.

To trigger the issue, simply run

gst-launch-1.0 libcamerasrc ! queue ! glimagesink

Edited by Jakub Adam

Merge request reports