[vlc-commits] es_out: really restart es with ES_OUT_RESTART_ES

Francois Cartegnie git at videolan.org
Sat Jul 4 15:50:47 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jun 16 18:19:39 2015 +0200| [9833215776571f26ad3ff687915ec789572e1d89] | committer: Francois Cartegnie

es_out: really restart es with ES_OUT_RESTART_ES

if an es is passed and is not a category es,
it is never restarted, just selected.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9833215776571f26ad3ff687915ec789572e1d89
---

 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 0ee3913..3ca04db 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2227,7 +2227,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;
                 }
             }



More information about the vlc-commits mailing list