libvlc API: Fix a possible SEGFAULT
authorCyril Mathé <cmathe@actech-innovation.com>
Wed, 1 Jul 2009 13:29:53 +0000 (15:29 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 1 Jul 2009 16:01:39 +0000 (18:01 +0200)
Signed-off-by: Rémi Duraffort <ivoire@videolan.org>
src/control/video.c

index 20b9481..e4720e9 100644 (file)
@@ -760,13 +760,17 @@ void libvlc_video_set_marquee_option_as_int( libvlc_media_player_t *p_mi,
         vout_thread_t * vout = GetVout( p_mi, &e );
         libvlc_exception_clear(&e);
         if (vout)
+        {
             vout_EnableFilter(vout, identifier, value, false);
+            vlc_object_release(vout);
+        }
         else
+        {
             libvlc_exception_raise( p_e, "No Vout" );
-        vlc_object_release(vout);
+        }
         return;
     }
-    
+
     vlc_object_t * marquee = get_marquee_object(p_mi);
     if(!marquee)
     {