[vlc-commits] Use input_Close() rather than vlc_object_release()

Rémi Denis-Courmont git at videolan.org
Thu May 21 18:36:59 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 21 19:36:02 2015 +0300| [5bd4542d60336a2250b348b0a40cb9ae23cfad75] | committer: Rémi Denis-Courmont

Use input_Close() rather than vlc_object_release()

input_Create() should be matched with input_Close().
vlc_object_release() should be used only to discard extra references to
the input thread object.

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

 lib/media_player.c |    2 +-
 src/input/vlm.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/media_player.c b/lib/media_player.c
index 530a9fb..75e4bb8 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -871,7 +871,7 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
         var_DelCallback( p_input_thread, "can-pause", input_pausable_changed, p_mi );
         var_DelCallback( p_input_thread, "program-scrambled", input_scrambled_changed, p_mi );
         var_DelCallback( p_input_thread, "can-seek", input_seekable_changed, p_mi );
-        vlc_object_release( p_input_thread );
+        input_Close( p_input_thread );
         libvlc_printerr( "Input initialization failure" );
         return -1;
     }
diff --git a/src/input/vlm.c b/src/input/vlm.c
index da1e9d4..8dd5cc3 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -1028,7 +1028,7 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
             if( input_Start( p_instance->p_input ) != VLC_SUCCESS )
             {
                 var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
-                vlc_object_release( p_instance->p_input );
+                input_Close( p_instance->p_input );
                 p_instance->p_input = NULL;
             }
         }



More information about the vlc-commits mailing list