]> git.sesse.net Git - vlc/commitdiff
asf.c: write new header when track is removed/added
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 30 Sep 2009 13:30:47 +0000 (16:30 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 6 Oct 2009 19:41:34 +0000 (22:41 +0300)
modules/mux/asf.c

index dc8c621d039edff0c0fd8b5601cedbbb1d2caf1d..cd8c8b431d857d98dd6568b9e061c92b27f4d96b 100644 (file)
@@ -141,7 +141,7 @@ struct sout_mux_sys_t
 
     vlc_array_t     *p_tracks;
 
-    bool      b_write_header;
+    bool            b_write_header;
 
     block_t         *pk;
     int             i_pk_used;
@@ -641,6 +641,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     vlc_array_append( p_sys->p_tracks, (void *)tk);
     tk->i_id = vlc_array_index_of_item( p_sys->p_tracks, tk ) + 1;
 
+
+    p_sys->b_write_header = true;
+
     return VLC_SUCCESS;
 }
 
@@ -674,6 +677,8 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
 
     vlc_array_remove( p_sys->p_tracks, vlc_array_index_of_item( p_sys->p_tracks, (void *)tk ) );
 
+
+    p_sys->b_write_header = true;
     return VLC_SUCCESS;
 }