[vlc-commits] [Git][videolan/vlc][master] srt: fix build with older libsrt

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 17 12:05:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
dfd2e92e by Steve Lhomme at 2026-09-17T11:52:29+00:00
srt: fix build with older libsrt

SRTO_IPV6ONLY was added in libsrt 1.3.3 [^1][^2].

Setting the option is mandatory but we set it to 0 which means:

> setting the `ipv6only` option to 0 or 1 is obligatory, as it is a part
> of the binding definition. If you set it to 1, the binding will apply only to
> IPv6 local addresses, and if you set it to 0, it will apply to both IPv4 and
> IPv6 local addresses.

So in older versions which didn't have this option it should be fine not to to anything.

Fixes #30133

[^1]: https://github.com/Haivision/srt/pull/608
[^2]: https://github.com/Haivision/srt/releases/tag/v1.3.3

- - - - -


1 changed file:

- modules/access/srt.c


Changes:

=====================================
modules/access/srt.c
=====================================
@@ -246,10 +246,12 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
             failed = true; goto out;
         }
 
+#if SRT_VERSION_VALUE >= SRT_MAKE_VERSION(1, 3, 3) // SRTO_IPV6ONLY was added in 1.3.3
         /* If binding IPv6 configure the socket */
         if (res_local->ai_family == AF_INET6) {
             srt_setsockopt(p_sys->sock, 0, SRTO_IPV6ONLY, &(int) { 0 }, sizeof(int));
         }
+#endif
 
         srt_setsockopt(p_sys->sock, 0, SRTO_REUSEADDR, &(int) { 1 }, sizeof(int));
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfd2e92e72be8853dc99599e731b9845661a235b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfd2e92e72be8853dc99599e731b9845661a235b
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list