[vlc-devel] [PATCH] decoder: request the vout only one time per format

Thomas Guillem thomas at gllm.fr
Sun Jul 2 13:15:33 CEST 2017


This fixes a busyloop that cause serious visual glitches when trying to request
a failing vout again and again.
---
 src/input/decoder.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index dac313737a..b34e26cd4e 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -408,8 +408,7 @@ static int vout_update_format( decoder_t *p_dec )
 {
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
 
-    if( p_owner->p_vout == NULL
-     || p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width
+    if( p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width
      || p_dec->fmt_out.video.i_height != p_owner->fmt.video.i_height
      || p_dec->fmt_out.video.i_visible_width != p_owner->fmt.video.i_visible_width
      || p_dec->fmt_out.video.i_visible_height != p_owner->fmt.video.i_visible_height
@@ -547,7 +546,7 @@ static int vout_update_format( decoder_t *p_dec )
         DecoderUpdateFormatLocked( p_dec );
         vlc_mutex_unlock( &p_owner->lock );
     }
-    return 0;
+    return p_owner->p_vout != NULL ? 0 : -1;
 }
 
 static picture_t *vout_new_buffer( decoder_t *p_dec )
-- 
2.11.0



More information about the vlc-devel mailing list