avformat/libsrt: fix deprecated warning

srt_socket was deprecated after 1.4.1.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
This commit is contained in:
Zhao Zhili 2022-03-25 15:39:04 +08:00 committed by Steven Liu
parent f125c504d8
commit 397a777aa1
1 changed files with 4 additions and 0 deletions

View File

@ -429,7 +429,11 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags)
restart:
#if SRT_VERSION_VALUE >= 0x010401
fd = srt_create_socket();
#else
fd = srt_socket(cur_ai->ai_family, cur_ai->ai_socktype, 0);
#endif
if (fd < 0) {
ret = libsrt_neterrno(h);
goto fail;