If an external camera was disconnected, there were no feedback in an
application. It seems reasonable to wait on mmal_queue no longer than
100ms. If it's stuck we just return a FLOW_ERROR and let the application
decide what to do later.
GstClockTime gst_pts = GST_CLOCK_TIME_NONE;
/* FIXME: Use our own interruptible cond wait: */
- buffer = mmal_queue_wait(state->encoded_buffer_q);
+ buffer = mmal_queue_timedwait(state->encoded_buffer_q, 100);
+
+ if (G_UNLIKELY(buffer == NULL)) {
+ return GST_FLOW_ERROR;
+ }
if (G_LIKELY (config->useSTC && clock)) {
MMAL_PARAMETER_INT64_T param;