From 23f3ade3a1c31da12b02b9b0c1d244d54ae9a06b Mon Sep 17 00:00:00 2001 From: Anas Date: Sun, 9 Aug 2020 21:05:07 +0300 Subject: [PATCH] Using queue instead of timeout on buffer read --- src/RaspiCapture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RaspiCapture.c b/src/RaspiCapture.c index 975078f..7c3dea1 100644 --- a/src/RaspiCapture.c +++ b/src/RaspiCapture.c @@ -938,7 +938,7 @@ raspi_capture_fill_buffer(RASPIVID_STATE *state, GstBuffer **bufp, GstClockTime gst_pts = GST_CLOCK_TIME_NONE; do { - buffer = mmal_queue_timedwait(state->encoded_buffer_q, 500); + buffer = mmal_queue_wait(state->encoded_buffer_q); // Work around a bug where mmal_queue_timedwait() might return // immediately if the internal timeout time aligns exactly // with a 1 second rollover boundary by checking errno.