summaryrefslogtreecommitdiff
path: root/media-video/vlc/files/vlc-3.0.14-fix-live-address-api.patch
blob: 2d6f86f0aba6cf6cc125927b31c41da1e162a844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Needed for https://bugs.gentoo.org/795798 and
https://code.videolan.org/videolan/vlc/-/issues/25473

From 94845266b705dc9de7921408531b9d7704f4458f Mon Sep 17 00:00:00 2001
From: Dominic Mayers <dominic.mayers@meditationstudies.org>
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 <liveMedia.hh>
 #include <liveMedia_version.hh>
 #include <Base64.hh>
+#include <NetAddress.hh>
 
 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