[vlc-devel] [PATCH 1/2] es_out: really restart es with ES_OUT_RESTART_ES

Francois Cartegnie fcvlcdev at free.fr
Tue Jun 16 18:24:21 CEST 2015


if an es is passed and is not a category es,
it is never restarted, just selected.
---
 src/input/es_out.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 3756b14..3704e4c 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2214,7 +2214,15 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
             {
                 if( es == p_sys->es[i] )
                 {
-                    EsOutSelect( out, es, true );
+                    if( i_query == ES_OUT_RESTART_ES && p_sys->es[i]->p_dec )
+                    {
+                        EsDestroyDecoder( out, p_sys->es[i] );
+                        EsCreateDecoder( out, p_sys->es[i] );
+                    }
+                    else if( i_query == ES_OUT_SET_ES )
+                    {
+                        EsOutSelect( out, es, true );
+                    }
                     break;
                 }
             }
-- 
2.1.0




More information about the vlc-devel mailing list