[vlc-commits] ts mux: fix mismatched callback deletion

Rémi Denis-Courmont git at videolan.org
Tue Nov 20 21:34:19 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 20 22:30:26 2018 +0200| [f4bd0db033de78bfee0cd66f8bec4c822cff3f13] | committer: Rémi Denis-Courmont

ts mux: fix mismatched callback deletion

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

 modules/mux/mpeg/ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 722a8a8708..95b7100fab 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -512,7 +512,7 @@ static csa_t *csaSetup( vlc_object_t *p_this )
 
     var_Create( p_mux, SOUT_CFG_PREFIX "csa-use", VLC_VAR_STRING | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
     var_AddCallback( p_mux, SOUT_CFG_PREFIX "csa-use", ActiveKeyCallback, NULL );
-    var_AddCallback( p_mux, SOUT_CFG_PREFIX "csa-ck", ChangeKeyCallback, (void *)1 );
+    var_AddCallback( p_mux, SOUT_CFG_PREFIX "csa-ck", ChangeKeyCallback, p_mux );
     var_AddCallback( p_mux, SOUT_CFG_PREFIX "csa2-ck", ChangeKeyCallback, NULL );
 
     vlc_value_t use_val;
@@ -766,7 +766,7 @@ static void Close( vlc_object_t * p_this )
 
     if( p_sys->csa )
     {
-        var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa-ck", ChangeKeyCallback, NULL );
+        var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa-ck", ChangeKeyCallback, p_mux );
         var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa2-ck", ChangeKeyCallback, NULL );
         var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa-use", ActiveKeyCallback, NULL );
         csa_Delete( p_sys->csa );



More information about the vlc-commits mailing list