samples: video: avoid K_FOREVER wait on initial buffer allocation
On samples startup, video buffers are being allocated in order to
hold the captured data. Currently the timeout is set to K_FOREVER,
leading to having those samples waiting forever if there isn't
enought memory available on the platform.
Considering that this is done at beginning of the sample and at
that moment there isn't reason to having to wait for the
availability of memory, the timeout is replaced by K_NO_WAIT which
will allow to have the function returning with an error if the
allocation is failing.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
3 files changed