vlc | branch: master | Julian Scheel <[email protected]> | Wed Jun 3 09:37:35 2015 +0200| [e14240974014231afe552657f49971af84550761] | committer: 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: Julian Scheel <[email protected]> Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e14240974014231afe552657f49971af84550761 --- modules/hw/mmal/vout.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c index 6654db2..c58dd3b 100644 --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c @@ -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) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
