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

mmal/vout: Do not wait for picture in non-opaque mode

When not running in opaque mode the buffer headed over for rendering is only
returned when the following buffer isrendered or the component is disabled. So
in this case waiting for the buffer to be returned immediately deadlocks the
rendering. As all buffers get immediately flushed on stop it is safe to skip
this wait for non-opaque usecase.
Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 73a21604
......@@ -587,10 +587,12 @@ static void vd_display(vout_display_t *vd, picture_t *picture,
maintain_phase_sync(vd);
sys->next_phase_check = (sys->next_phase_check + 1) % PHASE_CHECK_INTERVAL;
vlc_mutex_lock(&sys->buffer_mutex);
while (atomic_load(&sys->buffers_in_transit) >= MAX_BUFFERS_IN_TRANSIT)
vlc_cond_wait(&sys->buffer_cond, &sys->buffer_mutex);
vlc_mutex_unlock(&sys->buffer_mutex);
if (sys->opaque) {
vlc_mutex_lock(&sys->buffer_mutex);
while (atomic_load(&sys->buffers_in_transit) >= MAX_BUFFERS_IN_TRANSIT)
vlc_cond_wait(&sys->buffer_cond, &sys->buffer_mutex);
vlc_mutex_unlock(&sys->buffer_mutex);
}
}
static int vd_control(vout_display_t *vd, int query, va_list args)
......
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