avformat/librist: simplify secret strlcpy

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2021-03-06 22:31:06 +01:00
parent deffb5ddce
commit 7b0832dea8
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ static int librist_open(URLContext *h, const char *uri, int flags)
}
if (s->secret && peer_config->secret[0] == 0)
av_strlcpy(peer_config->secret, s->secret, FFMIN(RIST_MAX_STRING_SHORT - 1, strlen(s->secret)));
av_strlcpy(peer_config->secret, s->secret, RIST_MAX_STRING_SHORT);
if (s->secret && (s->encryption == 128 || s->encryption == 256))
peer_config->key_size = s->encryption;