[vlc-commits] intf: move function up

Thomas Guillem git at videolan.org
Fri Mar 8 09:36:20 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar  8 09:24:37 2019 +0100| [46828f817a223042d4fecc58596cf106f8390a13] | committer: Thomas Guillem

intf: move function up

No functional changes.

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

 src/interface/interface.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 9f91ee4129..e0a00e90b4 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -63,6 +63,27 @@ static int AddIntfCallback( vlc_object_t *, char const *,
 static vlc_mutex_t lock = VLC_STATIC_MUTEX;
 
 /**
+ * Creates the playlist if necessary, and return a pointer to it.
+ * @note The playlist is not reference-counted. So the pointer is only valid
+ * until intf_DestroyAll() destroys interfaces.
+ */
+static playlist_t *intf_GetPlaylist(libvlc_int_t *libvlc)
+{
+    playlist_t *playlist;
+
+    vlc_mutex_lock(&lock);
+    playlist = libvlc_priv(libvlc)->playlist;
+    if (playlist == NULL)
+    {
+        playlist = playlist_Create(VLC_OBJECT(libvlc));
+        libvlc_priv(libvlc)->playlist = playlist;
+    }
+    vlc_mutex_unlock(&lock);
+
+    return playlist;
+}
+
+/**
  * Create and start an interface.
  *
  * @param playlist playlist and parent object for the interface
@@ -126,27 +147,6 @@ error:
     return VLC_EGENERIC;
 }
 
-/**
- * Creates the playlist if necessary, and return a pointer to it.
- * @note The playlist is not reference-counted. So the pointer is only valid
- * until intf_DestroyAll() destroys interfaces.
- */
-static playlist_t *intf_GetPlaylist(libvlc_int_t *libvlc)
-{
-    playlist_t *playlist;
-
-    vlc_mutex_lock(&lock);
-    playlist = libvlc_priv(libvlc)->playlist;
-    if (playlist == NULL)
-    {
-        playlist = playlist_Create(VLC_OBJECT(libvlc));
-        libvlc_priv(libvlc)->playlist = playlist;
-    }
-    vlc_mutex_unlock(&lock);
-
-    return playlist;
-}
-
 static void
 PlaylistConfigureFromVariables(vlc_playlist_t *playlist, vlc_object_t *obj)
 {



More information about the vlc-commits mailing list