From 5a5f6fbaf04a427a5026f4b4f5312e79136c39a5 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 15 Jan 2022 13:08:17 +0000 Subject: [PATCH] Fix build with new live555 --- ...f.-from-getConnectionEndpointAddress.patch | 50 +++++++++++++++++++ vlc.spec | 5 ++ 2 files changed, 55 insertions(+) create mode 100644 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch diff --git a/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch b/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch new file mode 100644 index 0000000..a4dca5c --- /dev/null +++ b/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch @@ -0,0 +1,50 @@ +From 94845266b705dc9de7921408531b9d7704f4458f Mon Sep 17 00:00:00 2001 +From: Dominic Mayers +Date: Sun, 28 Mar 2021 04:37:54 -0400 +Subject: [PATCH] Get addr by ref. from getConnectionEndpointAddress. + +Fixes issue #25473 in code.videolan.org. The maintainers of live555 changed +connectionEndpointAddresss to getConnectionEndpointAddress, which now provides +the address value by reference. Before, connectionEndpointAddresss returned +the value. So, in modules/access/live555.cpp, we must first get the value and +then pass it to IsMulticastAddress. The code will not compile with the recent +live555 unless we also modify modules/access/Makefile.am - a different patch. +--- + modules/access/live555.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp +index 01c535ca5b..95e15e35d9 100644 +--- a/modules/access/live555.cpp ++++ b/modules/access/live555.cpp +@@ -60,6 +60,7 @@ + #include + #include + #include ++#include + + extern "C" { + #include "../access/mms/asf.h" /* Who said ugly ? */ +@@ -727,7 +728,8 @@ static int SessionsSetup( demux_t *p_demux ) + unsigned const thresh = 200000; /* RTP reorder threshold .2 second (default .1) */ + const char *p_sess_lang = NULL; + const char *p_lang; +- ++ struct sockaddr_storage addr; ++ + b_rtsp_tcp = var_CreateGetBool( p_demux, "rtsp-tcp" ) || + var_GetBool( p_demux, "rtsp-http" ); + i_client_port = var_InheritInteger( p_demux, "rtp-client-port" ); +@@ -850,7 +852,8 @@ static int SessionsSetup( demux_t *p_demux ) + if( !p_sys->b_multicast ) + { + /* We need different rollover behaviour for multicast */ +- p_sys->b_multicast = IsMulticastAddress( sub->connectionEndpointAddress() ); ++ sub->getConnectionEndpointAddress(addr); ++ p_sys->b_multicast = IsMulticastAddress( addr ); + } + + tk = (live_track_t*)malloc( sizeof( live_track_t ) ); +-- +2.25.1 + diff --git a/vlc.spec b/vlc.spec index 647c06a..024fd60 100644 --- a/vlc.spec +++ b/vlc.spec @@ -76,6 +76,8 @@ Patch9: notify-don-t-depend-on-any-GTK-version.patch Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch +# https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 +Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -354,6 +356,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif +%if 0%{?fedora} > 35 +%patch13 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :