[vlc-devel] [RFC PATCH 2/6] decoder: update error state when vout creation fails

Thomas Guillem thomas at gllm.fr
Fri Jul 1 18:14:51 CEST 2016


---
 src/input/decoder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 5b0fcc0..f0a87e8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -336,6 +336,7 @@ static int vout_update_format( decoder_t *p_dec )
             !p_dec->fmt_out.video.i_height )
         {
             /* Can't create a new vout without display size */
+            decoder_SetErrorGeneric( p_dec );
             return -1;
         }
 
@@ -437,6 +438,7 @@ static int vout_update_format( decoder_t *p_dec )
         if( p_vout == NULL )
         {
             msg_Err( p_dec, "failed to create video output" );
+            decoder_AddState( p_dec, DECODER_STATE_ERROR_OUTPUT );
             return -1;
         }
     }
-- 
2.8.1



More information about the vlc-devel mailing list