[vlc-commits] audiobargraph_v: simplify Close

Rafaël Carré git at videolan.org
Wed Apr 16 22:32:49 CEST 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Apr 16 16:04:55 2014 +0200| [e584696c4d6113fffbe6dd4281cb481bade389dd] | committer: Rafaël Carré

audiobargraph_v: simplify Close

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

 modules/video_filter/audiobargraph_v.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/modules/video_filter/audiobargraph_v.c b/modules/video_filter/audiobargraph_v.c
index a94c9c1..e56e182 100644
--- a/modules/video_filter/audiobargraph_v.c
+++ b/modules/video_filter/audiobargraph_v.c
@@ -915,7 +915,6 @@ static void Close( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys = p_filter->p_sys;
-    BarGraph_t *p_BarGraph = &(p_sys->p_BarGraph);
 
     for( int i = 0; ppsz_filter_callbacks[i]; i++ )
         var_DelCallback( p_filter, ppsz_filter_callbacks[i],
@@ -933,12 +932,10 @@ static void Close( vlc_object_t *p_this )
 
     vlc_mutex_destroy( &p_sys->lock );
 
-    if( p_BarGraph->p_pic )
-    {
-        picture_Release( p_BarGraph->p_pic );
-        p_BarGraph->p_pic = NULL;
-    }
-    free( p_BarGraph->i_values );
+    if( p_sys->p_BarGraph.p_pic )
+        picture_Release( p_sys->p_BarGraph.p_pic );
+
+    free( p_sys->p_BarGraph.i_values );
 
     free( p_sys );
 }



More information about the vlc-commits mailing list