[vlc-devel] [PATCH 1/2] vout: inline ThreadControl()

RĂ©mi Denis-Courmont remi at remlab.net
Tue Apr 14 21:08:53 CEST 2020


Non-functional change.
---
 src/video_output/video_output.c | 32 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 19 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 8fae1bd897..6a361e568d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1667,24 +1667,6 @@ error:
     return VLC_EGENERIC;
 }
 
-static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
-{
-    switch(cmd.type) {
-    case VOUT_CONTROL_CHANGE_FILTERS:
-        ThreadChangeFilters(vout, cmd.string, NULL, false);
-        break;
-    case VOUT_CONTROL_CHANGE_INTERLACE:
-        ThreadChangeFilters(vout, NULL, &cmd.boolean, false);
-        break;
-    case VOUT_CONTROL_MOUSE_STATE:
-        ThreadProcessMouseState(vout, &cmd.mouse);
-        break;
-    default:
-        break;
-    }
-    vout_control_cmd_Clean(&cmd);
-}
-
 /*****************************************************************************
  * Thread: video output thread
  *****************************************************************************
@@ -1712,7 +1694,19 @@ noreturn static void *Thread(void *object)
         }
         while (!vout_control_Pop(&sys->control, &cmd, deadline)) {
             int canc = vlc_savecancel();
-            ThreadControl(vout, cmd);
+
+            switch(cmd.type) {
+                case VOUT_CONTROL_CHANGE_FILTERS:
+                    ThreadChangeFilters(vout, cmd.string, NULL, false);
+                    break;
+                case VOUT_CONTROL_CHANGE_INTERLACE:
+                    ThreadChangeFilters(vout, NULL, &cmd.boolean, false);
+                    break;
+                case VOUT_CONTROL_MOUSE_STATE:
+                    ThreadProcessMouseState(vout, &cmd.mouse);
+                    break;
+            }
+            vout_control_cmd_Clean(&cmd);
             vlc_restorecancel(canc);
         }
 
-- 
2.26.0



More information about the vlc-devel mailing list