[vlc-commits] sdp: reorder to avoid forward declarations

Rémi Denis-Courmont git at videolan.org
Wed Apr 22 21:29:29 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 22 22:03:26 2020 +0300| [ca6465b711f0ba6c7ce952bf81d74999586d16fa] | committer: Rémi Denis-Courmont

sdp: reorder to avoid forward declarations

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

 modules/access/sdp.c | 54 +++++++++++++++++++++++-----------------------------
 1 file changed, 24 insertions(+), 30 deletions(-)

diff --git a/modules/access/sdp.c b/modules/access/sdp.c
index c30a84b9ea..c4e0355ecd 100644
--- a/modules/access/sdp.c
+++ b/modules/access/sdp.c
@@ -29,36 +29,6 @@
 #include <vlc_plugin.h>
 #include <vlc_access.h>
 
-static int Open (vlc_object_t *);
-
-vlc_module_begin ()
-    set_shortname (N_("SDP"))
-    set_description (N_("Session Description Protocol"))
-    set_category (CAT_INPUT)
-    set_subcategory (SUBCAT_INPUT_ACCESS)
-
-    set_capability ("access", 0)
-    set_callback(Open)
-    add_shortcut ("sdp")
-vlc_module_end()
-
-static ssize_t Read (stream_t *, void *, size_t);
-static int Seek (stream_t *, uint64_t);
-static int Control (stream_t *, int, va_list);
-
-static int Open (vlc_object_t *obj)
-{
-    stream_t *access = (stream_t *)obj;
-
-    access->pf_read = Read;
-    access->pf_block = NULL;
-    access->pf_seek = Seek;
-    access->pf_control = Control;
-    access->p_sys = (char *)access->psz_location;
-
-    return VLC_SUCCESS;
-}
-
 static ssize_t Read (stream_t *access, void *buf, size_t len)
 {
     char *in = access->p_sys, *out = buf;
@@ -109,3 +79,27 @@ static int Control (stream_t *access, int query, va_list args)
     }
     return VLC_EGENERIC;
 }
+
+static int Open (vlc_object_t *obj)
+{
+    stream_t *access = (stream_t *)obj;
+
+    access->pf_read = Read;
+    access->pf_block = NULL;
+    access->pf_seek = Seek;
+    access->pf_control = Control;
+    access->p_sys = (char *)access->psz_location;
+
+    return VLC_SUCCESS;
+}
+
+vlc_module_begin()
+    set_shortname(N_("SDP"))
+    set_description(N_("Session Description Protocol"))
+    set_category(CAT_INPUT)
+    set_subcategory(SUBCAT_INPUT_ACCESS)
+
+    set_capability("access", 0)
+    set_callback(Open)
+    add_shortcut("sdp")
+vlc_module_end()



More information about the vlc-commits mailing list