From: Julien Montant <julien.montant@gmail.com>
Date: Tue, 13 Oct 2020 19:45:15 +0000 (+0200)
Subject: srt: fix build issue with recent SRT library
X-Git-Url: https://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=6e8d77431127c482196115a6eeb769daf56347b3;hp=6105f8eb738ac174ef1a77272ea6702db8ac30f5

srt: fix build issue with recent SRT library

The deprecated macro `SRTO_TSBPDDELAY` has been deleted from SRT.
This prevents the compilation with SRT versions >= v1.4.2.

See the corresponding SRT commit 0e2201aff6b379979cec43fee5e8f162717f6346.
```
-   SRTO_TSBPDDELAY = 23,     // DEPRECATED. ALIAS: SRTO_LATENCY
```

The (unrecommended) `SRTO_LATENCY` should be used instead, which was
already available back then. See notice next to SRTO_LATENCY in the SRT
library source code for details on why it's not recommended.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
(edited message)
---

diff --git a/modules/access/srt.c b/modules/access/srt.c
index 499a300196..d7ef51fccf 100644
--- a/modules/access/srt.c
+++ b/modules/access/srt.c
@@ -164,7 +164,7 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
 
     /* Set latency */
     i_latency = var_InheritInteger( p_stream, "latency" );
-    srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY,
+    srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY,
         &i_latency, sizeof( int ) );
 
     psz_passphrase = var_InheritString( p_stream, "passphrase" );
diff --git a/modules/access_output/srt.c b/modules/access_output/srt.c
index 0b66f24a8a..3d579eb1bd 100644
--- a/modules/access_output/srt.c
+++ b/modules/access_output/srt.c
@@ -155,7 +155,7 @@ static bool srt_schedule_reconnect(sout_access_out_t *p_access)
 
     /* Set latency */
     i_latency = var_InheritInteger( p_access, "latency" );
-    srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY,
+    srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY,
         &i_latency, sizeof( int ) );
 
     if ( psz_passphrase != NULL && psz_passphrase[0] != '\0')
