]> git.sesse.net Git - vlc/commitdiff
* es_out: fix program change on the fly.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 25 Jan 2005 14:15:08 +0000 (14:15 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 25 Jan 2005 14:15:08 +0000 (14:15 +0000)
src/input/es_out.c

index 783c5970ed0b0b85bf2b48cd397f249121dc8169..0ccba8c1676eb6fbe89bfecc9fa3a1eb0459b66b 100644 (file)
@@ -360,6 +360,10 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
                 p_sys->i_mode != ES_OUT_MODE_ALL )
                 EsUnselect( out, p_sys->es[i], VLC_TRUE );
         }
+
+        p_sys->p_es_audio = NULL;
+        p_sys->p_es_sub = NULL;
+        p_sys->p_es_video = NULL;
     }
 
     msg_Dbg( p_input, "Selecting program id=%d", p_pgrm->i_id );
@@ -385,7 +389,8 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
     var_Change( p_input, "spu-es",   VLC_VAR_CLEARCHOICES, NULL, NULL );
     for( i = 0; i < p_sys->i_es; i++ )
     {
-        EsOutESVarUpdate( out, p_sys->es[i], VLC_FALSE );
+        if( p_sys->es[i]->p_pgrm == p_sys->p_pgrm )
+            EsOutESVarUpdate( out, p_sys->es[i], VLC_FALSE );
         EsOutSelect( out, p_sys->es[i], VLC_FALSE );
     }