srt: Add "const" keyword to a function argument
authorSeungha Yang <seungha.yang@navercorp.com>
Wed, 25 Jul 2018 01:44:20 +0000 (10:44 +0900)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Mon, 30 Jul 2018 20:50:10 +0000 (16:50 -0400)
Given "passphrase" shouldn't be modified

https://bugzilla.gnome.org/show_bug.cgi?id=796842

ext/srt/gstsrt.c
ext/srt/gstsrt.h

index 53c8f51..e845b14 100644 (file)
@@ -36,7 +36,7 @@ SRTSOCKET
 gst_srt_client_connect (GstElement * elem, int sender,
     const gchar * host, guint16 port, int rendez_vous,
     const gchar * bind_address, guint16 bind_port, int latency,
-    GSocketAddress ** socket_address, gint * poll_id, gchar * passphrase,
+    GSocketAddress ** socket_address, gint * poll_id, const gchar * passphrase,
     int key_length)
 {
   SRTSOCKET sock = SRT_INVALID_SOCK;
index 2b0381e..776593e 100644 (file)
@@ -41,7 +41,7 @@ gst_srt_client_connect (GstElement * elem, int sender,
     const gchar * host, guint16 port, int rendez_vous,
     const gchar * bind_address, guint16 bind_port, int latency,
     GSocketAddress ** socket_address, gint * poll_id,
-    gchar * passphrase, int key_length);
+    const gchar * passphrase, int key_length);
 
 SRTSOCKET
 gst_srt_server_listen (GstElement * elem, int sender,