gstreamer: allocator: gst_libcamera_allocator_new(): Recognize errors
`FrameBufferAllocator::allocate()` might return a negative error code, but currently this is handled the same way as success. So instead of continuing, abort the construction of the allocator object. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
This commit is contained in:
parent
d49a84a4f3
commit
fd6e41b9fb
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ gst_libcamera_allocator_new(std::shared_ptr<Camera> camera,
|
||||||
Stream *stream = streamCfg.stream();
|
Stream *stream = streamCfg.stream();
|
||||||
|
|
||||||
ret = self->fb_allocator->allocate(stream);
|
ret = self->fb_allocator->allocate(stream);
|
||||||
if (ret == 0)
|
if (ret <= 0)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
GQueue *pool = g_queue_new();
|
GQueue *pool = g_queue_new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue