Commit adcc436f authored by Julian Scheel's avatar Julian Scheel Committed by Jean-Baptiste Kempf

mmal/mmal_picture: Don't wait inifinitely for picture

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: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a0ffd5a2
......@@ -40,7 +40,7 @@ int mmal_picture_lock(picture_t *picture)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment