]> git.sesse.net Git - vlc/commitdiff
Properly cleanup afilters and vfilters on Close(). (Patch by Ikka Ollakka)
authorJean-Paul Saman <jpsaman@videolan.org>
Mon, 18 Jun 2007 09:53:53 +0000 (09:53 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Mon, 18 Jun 2007 09:53:53 +0000 (09:53 +0000)
modules/stream_out/transcode.c

index 5d3a5e1bd1ca7c90a7c9285a0d967e3f816df197..d76304a3d098dcd550618b312cecc67e4c68129c 100644 (file)
@@ -798,6 +798,15 @@ static void Close( vlc_object_t * p_this )
 
     sout_StreamDelete( p_sys->p_out );
 
+    while( p_sys->i_afilters )
+    {
+        p_sys->i_afilters--;
+        if( p_sys->psz_afilters[p_sys->i_afilters] )
+            free( p_sys->psz_afilters[p_sys->i_afilters] );
+        if( p_sys->p_afilters_cfg[p_sys->i_afilters] )
+            free( p_sys->p_afilters_cfg[p_sys->i_afilters] );
+    }
+
     while( p_sys->p_audio_cfg != NULL )
     {
         config_chain_t *p_next = p_sys->p_audio_cfg->p_next;
@@ -812,6 +821,15 @@ static void Close( vlc_object_t * p_this )
     }
     if( p_sys->psz_aenc ) free( p_sys->psz_aenc );
 
+    while( p_sys->i_vfilters )
+    {
+        p_sys->i_vfilters--;
+        if( p_sys->psz_vfilters[p_sys->i_vfilters] )
+            free( p_sys->psz_vfilters[p_sys->i_vfilters] );
+        if( p_sys->p_vfilters_cfg[p_sys->i_vfilters] )
+            free( p_sys->p_vfilters_cfg[p_sys->i_vfilters] );
+    }
+
     while( p_sys->p_video_cfg != NULL )
     {
         config_chain_t *p_next = p_sys->p_video_cfg->p_next;