diff mbox series

[FFmpeg-devel] avformat/libsrt: add missing version check for snddropdelay

Message ID 20211119202901.19734-1-cus@passwd.hu
State Accepted
Commit 6f10f4a47948525174e654c9e312871dacdfc300
Headers show
Series [FFmpeg-devel] avformat/libsrt: add missing version check for snddropdelay | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Marton Balint Nov. 19, 2021, 8:29 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/libsrt.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lance Wang Nov. 20, 2021, 2:38 a.m. UTC | #1
On Fri, Nov 19, 2021 at 09:29:01PM +0100, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavformat/libsrt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
> index 145eea2f7c..19b9cb9895 100644
> --- a/libavformat/libsrt.c
> +++ b/libavformat/libsrt.c
> @@ -320,7 +320,9 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
>      int latency = s->latency / 1000;
>      int rcvlatency = s->rcvlatency / 1000;
>      int peerlatency = s->peerlatency / 1000;
> +#if SRT_VERSION_VALUE >= 0x010302
>      int snddropdelay = s->snddropdelay > 0 ? s->snddropdelay / 1000 : s->snddropdelay;
> +#endif
>      int connect_timeout = s->connect_timeout;

LGTM

>  
>      if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", &yes, sizeof(yes)) < 0) ||
> -- 
> 2.31.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Marton Balint Nov. 25, 2021, 6:10 p.m. UTC | #2
On Sat, 20 Nov 2021, lance.lmwang@gmail.com wrote:

> On Fri, Nov 19, 2021 at 09:29:01PM +0100, Marton Balint wrote:
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavformat/libsrt.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
>> index 145eea2f7c..19b9cb9895 100644
>> --- a/libavformat/libsrt.c
>> +++ b/libavformat/libsrt.c
>> @@ -320,7 +320,9 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
>>      int latency = s->latency / 1000;
>>      int rcvlatency = s->rcvlatency / 1000;
>>      int peerlatency = s->peerlatency / 1000;
>> +#if SRT_VERSION_VALUE >= 0x010302
>>      int snddropdelay = s->snddropdelay > 0 ? s->snddropdelay / 1000 : s->snddropdelay;
>> +#endif
>>      int connect_timeout = s->connect_timeout;
>
> LGTM

Thanks, will apply.

Regards,
Marton
diff mbox series

Patch

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 145eea2f7c..19b9cb9895 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -320,7 +320,9 @@  static int libsrt_set_options_pre(URLContext *h, int fd)
     int latency = s->latency / 1000;
     int rcvlatency = s->rcvlatency / 1000;
     int peerlatency = s->peerlatency / 1000;
+#if SRT_VERSION_VALUE >= 0x010302
     int snddropdelay = s->snddropdelay > 0 ? s->snddropdelay / 1000 : s->snddropdelay;
+#endif
     int connect_timeout = s->connect_timeout;
 
     if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", &yes, sizeof(yes)) < 0) ||