summaryrefslogtreecommitdiff
path: root/libavformat/libsrt.c
diff options
context:
space:
mode:
authorSven Dueking <sven@nablet.com>2018-07-13 02:08:50 +0200
committerLuca Barbato <lu_zero@gentoo.org>2018-07-13 18:36:11 +0200
commitf25117a4286505b38c12466ef04459471de3c1b0 (patch)
tree0f182ace9c6d6195181e64a598c5f80ba06fe15a /libavformat/libsrt.c
parentb93026777aada7742583d8c5ab079e9f4dfe9a5d (diff)
libsrt: Pass the correct pointer for the passphrase
The passphrase field is a pointer already. Bug-Id: https://github.com/Haivision/srt/issues/416
Diffstat (limited to 'libavformat/libsrt.c')
-rw-r--r--libavformat/libsrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 8e44ce6b80..f901bba875 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -289,7 +289,7 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", &yes, sizeof(yes)) < 0) ||
(s->maxbw >= 0 && libsrt_setsockopt(h, fd, SRTO_MAXBW, "SRTO_MAXBW", &s->maxbw, sizeof(s->maxbw)) < 0) ||
(s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
- (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", &s->passphrase, sizeof(s->passphrase)) < 0) ||
+ (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
(s->mss >= 0 && libsrt_setsockopt(h, fd, SRTO_MSS, "SRTO_MMS", &s->mss, sizeof(s->mss)) < 0) ||
(s->ffs >= 0 && libsrt_setsockopt(h, fd, SRTO_FC, "SRTO_FC", &s->ffs, sizeof(s->ffs)) < 0) ||
(s->ipttl >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTTL, "SRTO_UPTTL", &s->ipttl, sizeof(s->ipttl)) < 0) ||