[vlc-commits] dbus: remove useless hold/release

Rémi Denis-Courmont git at videolan.org
Thu Feb 28 20:23:28 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 27 22:01:40 2019 +0200| [9fc98d61255233a5bd49d3689e468a640fae7a18] | committer: Rémi Denis-Courmont

dbus: remove useless hold/release

The code assumes that the input is valid in the first place.

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

 modules/control/dbus/dbus_root.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c
index 312c120a9c..083185bde9 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -93,9 +93,7 @@ MarshalCanSetFullscreen( intf_thread_t *p_intf, DBusMessageIter *container )
 
     if (p_intf->p_sys->p_input)
     {
-        p_input = (input_thread_t*) vlc_object_hold( p_intf->p_sys->p_input );
-        vout_thread_t* p_vout = input_GetVout( p_input );
-        vlc_object_release( p_input );
+        vout_thread_t* p_vout = input_GetVout( p_intf->p_sys->p_input );
 
         if ( p_vout )
         {
@@ -138,9 +136,7 @@ DBUS_METHOD( FullscreenSet )
 
     if (INTF->p_sys->p_input)
     {
-        p_input = (input_thread_t*) vlc_object_hold( INTF->p_sys->p_input );
-        vout_thread_t* p_vout = input_GetVout( p_input );
-        vlc_object_release( p_input );
+        vout_thread_t* p_vout = input_GetVout( INTF->p_sys->p_input );
 
         if ( p_vout )
             var_SetBool( p_vout, "fullscreen", ( b_fullscreen == TRUE ) );



More information about the vlc-commits mailing list