gst: prevent src task deadlock on exhausted buffer pool
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