[vlc-commits] motion: destroy transform-type variable when unused

Pierre Ynard git at videolan.org
Fri Oct 12 01:15:18 CEST 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Oct 12 01:13:10 2012 +0200| [867738b542c2dc8b802589ce47462d05ac55f553] | committer: Pierre Ynard

motion: destroy transform-type variable when unused

This still sucks badly though

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

 modules/control/motion.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/control/motion.c b/modules/control/motion.c
index 05fde54..27255df 100644
--- a/modules/control/motion.c
+++ b/modules/control/motion.c
@@ -160,8 +160,14 @@ static void RunIntf( intf_thread_t *p_intf )
                 p_vout = input_GetVout( p_input );
                 if( p_vout )
                 {
-                    var_Create( p_vout, "transform-type", VLC_VAR_STRING );
-                    var_SetString( p_vout, "transform-type", psz_type );
+                    if( psz_type != NULL )
+                    {
+                        var_Create( p_vout, "transform-type", VLC_VAR_STRING );
+                        var_SetString( p_vout, "transform-type", psz_type );
+                    }
+                    else
+                        var_Destroy( p_vout, "transform-type" );
+
                     var_SetString( p_vout, "video-filter",
                                    psz_type != NULL ? "transform" : "" );
                     vlc_object_release( p_vout );



More information about the vlc-commits mailing list