Debug
Some checks failed
PostmarketOS Build / Build for aarch64 (push) Has been cancelled
PostmarketOS Build / Prepare (push) Has been cancelled
PostmarketOS Build / Build for x86_64 (push) Has been cancelled
PostmarketOS Build / Clean (push) Has been cancelled

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-07-09 17:08:56 +03:00
parent 8fbd5b04e5
commit f9e9e62cc7
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582
4 changed files with 12 additions and 3 deletions

View file

@ -39,9 +39,8 @@ gst_libcamera_pool_pop_buffer(GstLibcameraPool *self)
GLibLocker lock(GST_OBJECT(self)); GLibLocker lock(GST_OBJECT(self));
GstBuffer *buf; GstBuffer *buf;
if (self->queue->empty()) if (self->queue->empty() || self->queue->size() == 0)
return nullptr; return nullptr;
buf = self->queue->front(); buf = self->queue->front();
self->queue->pop_front(); self->queue->pop_front();

View file

@ -342,7 +342,7 @@ int GstLibcameraSrcState::processRequest()
{ {
GLibLocker locker(&lock_); GLibLocker locker(&lock_);
if (!completedRequests_.empty()) { if (!completedRequests_.empty() && completedRequests_.size() != 0) {
wrap = std::move(completedRequests_.front()); wrap = std::move(completedRequests_.front());
completedRequests_.pop(); completedRequests_.pop();
} }

View file

@ -284,6 +284,8 @@ public:
unsigned int streamIndex(const Stream *stream) const unsigned int streamIndex(const Stream *stream) const
{ {
if(streams_.empty())
return 0;
return stream - &streams_.front(); return stream - &streams_.front();
} }

View file

@ -407,6 +407,10 @@ void SoftwareIsp::statsReady(uint32_t frame, uint32_t bufferId)
void SoftwareIsp::inputReady(FrameBuffer *input) void SoftwareIsp::inputReady(FrameBuffer *input)
{ {
if(queuedInputBuffers_.empty()){
LOG(SoftwareIsp, Error) << "Lol, it's empty (input)";
return;
}
ASSERT(queuedInputBuffers_.front() == input); ASSERT(queuedInputBuffers_.front() == input);
queuedInputBuffers_.pop_front(); queuedInputBuffers_.pop_front();
inputBufferReady.emit(input); inputBufferReady.emit(input);
@ -414,6 +418,10 @@ void SoftwareIsp::inputReady(FrameBuffer *input)
void SoftwareIsp::outputReady(FrameBuffer *output) void SoftwareIsp::outputReady(FrameBuffer *output)
{ {
if(queuedOutputBuffers_.empty()){
LOG(SoftwareIsp, Error) << "Lol, it's empty (output)";
return;
}
ASSERT(queuedOutputBuffers_.front() == output); ASSERT(queuedOutputBuffers_.front() == output);
queuedOutputBuffers_.pop_front(); queuedOutputBuffers_.pop_front();
outputBufferReady.emit(output); outputBufferReady.emit(output);