Use mmal_queue_timedwait instead of mmal_queue_wait to avoid deadlocks if due
to some unexpected reason no mmal buffer is available for a picture to be
locked. This makes the mmal plugins more robust against mmal internal
failures.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
vlc_mutex_lock(get_mmal_opaque_mutex());
- MMAL_BUFFER_HEADER_T *buffer = mmal_queue_wait(pic_sys->queue);
+ MMAL_BUFFER_HEADER_T *buffer = mmal_queue_timedwait(pic_sys->queue, 2);
if (!buffer) {
ret = VLC_EGENERIC;
goto out;