[vlc-devel] [PATCH 3/3] resource: merge input_resource_PutVout() and input_resource_PutVoutLocked()

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 21 13:26:22 CEST 2019


---
 src/input/resource.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index 7370511a8c0..bcbf63defdc 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -324,9 +324,10 @@ void input_resource_SetInput( input_resource_t *p_resource, input_thread_t *p_in
     vlc_mutex_unlock( &p_resource->lock );
 }
 
-static void input_resource_PutVoutLocked(input_resource_t *p_resource,
-                                         vout_thread_t *vout)
+void input_resource_PutVout(input_resource_t *p_resource,
+                                   vout_thread_t *vout)
 {
+    vlc_mutex_lock( &p_resource->lock );
     assert(vout != NULL);
     vlc_mutex_lock(&p_resource->lock_hold);
     assert( p_resource->i_vout > 0 );
@@ -354,13 +355,6 @@ static void input_resource_PutVoutLocked(input_resource_t *p_resource,
         vlc_mutex_unlock(&p_resource->lock_hold);
         vout_Close(vout);
     }
-}
-
-void input_resource_PutVout(input_resource_t *p_resource,
-                                   vout_thread_t *vout)
-{
-    vlc_mutex_lock( &p_resource->lock );
-    input_resource_PutVoutLocked( p_resource, vout );
     vlc_mutex_unlock( &p_resource->lock );
 }
 
-- 
2.17.1



More information about the vlc-devel mailing list