Skip to content

Commit 3d26719

Browse files
committed
samples: drivers: video: capture: switch to K_NO_WAIT
Make video allocation non-blocking (K_NO_WAIT) and return an error verbosely rather than get the example get stuck. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent f2c8187 commit 3d26719

File tree

1 file changed

+1
-1
lines changed
  • samples/drivers/video/capture/src

1 file changed

+1
-1
lines changed

samples/drivers/video/capture/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static int app_setup_video_buffers(const struct device *const video_dev,
318318
* buffer alignment is needed in order to achieve the best performance
319319
*/
320320
vbuf = video_buffer_aligned_alloc(fmt->size, CONFIG_VIDEO_BUFFER_POOL_ALIGN,
321-
K_FOREVER);
321+
K_NO_WAIT);
322322
if (vbuf == NULL) {
323323
LOG_ERR("Unable to alloc video buffer");
324324
return -ENOMEM;

0 commit comments

Comments
 (0)