srt: fix bug in setting passphrase
authorAaron Boxer <aaron.boxer@collabora.com>
Wed, 3 Apr 2019 17:11:56 +0000 (13:11 -0400)
committerThomas Guillem <thomas@gllm.fr>
Thu, 4 Apr 2019 07:46:28 +0000 (09:46 +0200)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/access/srt.c
modules/access_output/srt.c

index 2cf800a..ac73fbc 100644 (file)
@@ -174,7 +174,7 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
                 SRTO_PBKEYLEN, &i_key_length, sizeof(i_key_length) );
 
         srt_set_socket_option( strm_obj, SRT_PARAM_PASSPHRASE, p_sys->sock,
-                SRTO_PASSPHRASE, &psz_passphrase, sizeof(psz_passphrase) );
+                SRTO_PASSPHRASE, psz_passphrase, strlen(psz_passphrase) );
     }
 
     /* set maximum payload size */
index d772a48..da55a30 100644 (file)
@@ -165,7 +165,7 @@ static bool srt_schedule_reconnect(sout_access_out_t *p_access)
                 SRTO_PBKEYLEN, &i_key_length, sizeof(i_key_length) );
 
         srt_set_socket_option( access_obj, SRT_PARAM_PASSPHRASE, p_sys->sock,
-                SRTO_PASSPHRASE, &psz_passphrase, sizeof(psz_passphrase) );
+                SRTO_PASSPHRASE, psz_passphrase, strlen(psz_passphrase) );
     }
 
     /* set maximumu payload size */