[vlc-devel] commit: SPU: create "highlight" before attaching to it ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 21 19:09:06 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 21 20:08:54 2010 +0200| [4cc00ee38f49806f30342ba38df388b29e89a073] | committer: Rémi Denis-Courmont 

SPU: create "highlight" before attaching to it

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

 src/video_output/vout_subpictures.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 2d69e64..5121eb8 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -302,6 +302,7 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach )
     if( b_attach )
     {
         UpdateSPU( p_spu, VLC_OBJECT(p_input) );
+        var_Create( p_input, "highlight", VLC_VAR_BOOL );
         var_AddCallback( p_input, "highlight", CropCallback, p_spu );
         var_AddCallback( p_input, "sub-margin", MarginCallback, p_spu->p );
 
@@ -313,9 +314,10 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach )
     }
     else
     {
-        /* Delete callback */
-        var_DelCallback( p_input, "highlight", CropCallback, p_spu );
+        /* Delete callbacks */
         var_DelCallback( p_input, "sub-margin", MarginCallback, p_spu->p );
+        var_DelCallback( p_input, "highlight", CropCallback, p_spu );
+        var_Destroy( p_input, "highlight" );
         vlc_object_release( p_input );
     }
 }




More information about the vlc-devel mailing list