[vlc-devel] [RFC PATCH 5/8] input: deactivate the decoder ES track in case of error

Thomas Guillem thomas at gllm.fr
Thu Apr 21 18:24:35 CEST 2016


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

diff --git a/src/input/input.c b/src/input/input.c
index 0791966..317155c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1983,6 +1983,19 @@ static bool Control( input_thread_t *p_input,
                            - INPUT_CONTROL_NAV_ACTIVATE + DEMUX_NAV_ACTIVATE );
             break;
 
+        case INPUT_CONTROL_DECODER_STATE:
+        {
+            struct decoder_state_control *p_ctrl = val.p_address;
+
+            if( p_ctrl->state >= DECODER_ERROR_GENERIC )
+            {
+                /* Deactivate the ES track in case of a decoder error */
+                vlc_value_t v;
+                v.i_int = -p_ctrl->i_cat;
+                Control( p_input, INPUT_CONTROL_SET_ES, v );
+            }
+            break;
+        }
         default:
             msg_Err( p_input, "not yet implemented" );
             break;
-- 
2.8.0.rc3



More information about the vlc-devel mailing list