diff mbox series

[FFmpeg-devel] lavf/srt: fix build fail when used the libsrt 1.4.1

Message ID 1594533783-28695-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315
Headers show
Series [FFmpeg-devel] lavf/srt: fix build fail when used the libsrt 1.4.1 | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao July 12, 2020, 6:03 a.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

libsrt 1.4.1 changed the:
SRTO_SMOOTHER   -> SRTO_CONGESTION
SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION
SRTO_TSBPDDELAY -> SRTO_LATENCY
and removed the front of deprecated option, it's lead to build fail

fix #8760

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavformat/libsrt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Moritz Barsnick July 12, 2020, 12:39 p.m. UTC | #1
On Sun, Jul 12, 2020 at 14:03:03 +0800, Jun Zhao wrote:
> From: Jun Zhao <barryjzhao@tencent.com>

(Which thread are you replying to?)

> libsrt 1.4.1 changed the:
> SRTO_SMOOTHER   -> SRTO_CONGESTION

AFAICT, this was changed in 1.3.3 (even though the commit doesn't
change the doc/API.md where it states 1.3.0):
https://github.com/Haivision/srt/commit/6f6b76b381ba8854fcd699908f74fae4cfce6783

> SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION

This was changed in 1.4.0. Does this codec compile with 1.4.0 after your
fix? Did it ever?
https://github.com/Haivision/srt/commit/a82e0c34b0aadcb309d9e2f322b26f8f59bf827a

> SRTO_TSBPDDELAY -> SRTO_LATENCY

You didn't change any code regarding these two, and anyway,
SRTO_LATENCY has existed as an alias since 1.2.0:
https://github.com/Haivision/srt/commit/508eeeb8dec6bcee123fa0d1d7f7fe3b0060eb77

Considering that 1.4.0 was released 10 months ago, I wonder whether
anyone compiled against a recent libsrt since then?

Cheers,
Moritz
Christopher Degawa July 12, 2020, 2:26 p.m. UTC | #2
> Considering that 1.4.0 was released 10 months ago, I wonder whether
> anyone compiled against a recent libsrt since then?

I can confirm that this fixes compilation errors with the latest
master branch of srt
https://github.com/Haivision/srt/commit/0e2201aff6b379979cec43fee5e8f162717f6346
and FFmpeg https://github.com/FFmpeg/FFmpeg/commit/3205ed31a7756ae563301e2f5a5dd2c853b20349

> _______________________________________________
> 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".
mypopy@gmail.com July 12, 2020, 2:44 p.m. UTC | #3
On Sun, Jul 12, 2020 at 8:39 PM Moritz Barsnick <barsnick@gmx.net> wrote:
>
> On Sun, Jul 12, 2020 at 14:03:03 +0800, Jun Zhao wrote:
> > From: Jun Zhao <barryjzhao@tencent.com>
>
> (Which thread are you replying to?)
>
> > libsrt 1.4.1 changed the:
> > SRTO_SMOOTHER   -> SRTO_CONGESTION
>
> AFAICT, this was changed in 1.3.3 (even though the commit doesn't
> change the doc/API.md where it states 1.3.0):
> https://github.com/Haivision/srt/commit/6f6b76b381ba8854fcd699908f74fae4cfce6783
>
> > SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION
>
> This was changed in 1.4.0. Does this codec compile with 1.4.0 after your
> fix? Did it ever?
> https://github.com/Haivision/srt/commit/a82e0c34b0aadcb309d9e2f322b26f8f59bf827a
>
> > SRTO_TSBPDDELAY -> SRTO_LATENCY
>
> You didn't change any code regarding these two, and anyway,
> SRTO_LATENCY has existed as an alias since 1.2.0:
> https://github.com/Haivision/srt/commit/508eeeb8dec6bcee123fa0d1d7f7fe3b0060eb77
>
> Considering that 1.4.0 was released 10 months ago, I wonder whether
> anyone compiled against a recent libsrt since then?
>
> Cheers,
> Moritz
Maybe I give an inaccurate description in the commit message, in fact,
libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
lead to FFmpeg build fail when using libsrt  version >= 1.4.1
Moritz Barsnick July 14, 2020, 1:47 p.m. UTC | #4
On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> Maybe I give an inaccurate description in the commit message, in fact,
> libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> lead to FFmpeg build fail when using libsrt  version >= 1.4.1

I don't mind you description. Yet your code change references 1.4.1:
    SRT_VERSION_VALUE >= 0x010401
while I am trying to make the point that 1.4.0 also needs this change
(or 1.3.0 in one case, which is already ensured by #if).

Moritz
mypopy@gmail.com July 15, 2020, 3:42 a.m. UTC | #5
On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
>
> On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > Maybe I give an inaccurate description in the commit message, in fact,
> > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
>
> I don't mind you description. Yet your code change references 1.4.1:
>     SRT_VERSION_VALUE >= 0x010401
Will double-check the SRT_VERSION_VALUE, thx
> while I am trying to make the point that 1.4.0 also needs this change
> (or 1.3.0 in one case, which is already ensured by #if).
>
mypopy@gmail.com July 16, 2020, 1:35 a.m. UTC | #6
On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
>
> On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > Maybe I give an inaccurate description in the commit message, in fact,
> > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
>
> I don't mind you description. Yet your code change references 1.4.1:
>     SRT_VERSION_VALUE >= 0x010401
> while I am trying to make the point that 1.4.0 also needs this change
> (or 1.3.0 in one case, which is already ensured by #if).
>

After double-check, I think the patch is Ok, in fact, libsrt keeps the
deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
options in libsrt 1.3.3/1.3.4/1.4.0) until commit
0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
1.3.3/1.3.4/1.4.0 is OK with the patch.
mypopy@gmail.com July 18, 2020, 12:31 p.m. UTC | #7
On Thu, Jul 16, 2020 at 9:35 AM mypopy@gmail.com <mypopy@gmail.com> wrote:
>
> On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
> >
> > On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > > Maybe I give an inaccurate description in the commit message, in fact,
> > > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
> >
> > I don't mind you description. Yet your code change references 1.4.1:
> >     SRT_VERSION_VALUE >= 0x010401
> > while I am trying to make the point that 1.4.0 also needs this change
> > (or 1.3.0 in one case, which is already ensured by #if).
> >
>
> After double-check, I think the patch is Ok, in fact, libsrt keeps the
> deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
> options in libsrt 1.3.3/1.3.4/1.4.0) until commit
> 0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
> 1.3.3/1.3.4/1.4.0 is OK with the patch.
Ping
Christopher Degawa July 25, 2020, 3:33 p.m. UTC | #8
On Sat, Jul 18, 2020 at 9:24 AM mypopy@gmail.com <mypopy@gmail.com> wrote:
>
> On Thu, Jul 16, 2020 at 9:35 AM mypopy@gmail.com <mypopy@gmail.com> wrote:
> >
> > On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
> > >
> > > On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > > > Maybe I give an inaccurate description in the commit message, in fact,
> > > > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > > > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
> > >
> > > I don't mind you description. Yet your code change references 1.4.1:
> > >     SRT_VERSION_VALUE >= 0x010401
> > > while I am trying to make the point that 1.4.0 also needs this change
> > > (or 1.3.0 in one case, which is already ensured by #if).
> > >
> >
> > After double-check, I think the patch is Ok, in fact, libsrt keeps the
> > deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
> > options in libsrt 1.3.3/1.3.4/1.4.0) until commit
> > 0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
> > 1.3.3/1.3.4/1.4.0 is OK with the patch.
> Ping
> _______________________________________________
> 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".

Ping
mypopy@gmail.com July 27, 2020, 11:37 a.m. UTC | #9
On Sat, Jul 18, 2020 at 8:31 PM mypopy@gmail.com <mypopy@gmail.com> wrote:
>
> On Thu, Jul 16, 2020 at 9:35 AM mypopy@gmail.com <mypopy@gmail.com> wrote:
> >
> > On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
> > >
> > > On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > > > Maybe I give an inaccurate description in the commit message, in fact,
> > > > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > > > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
> > >
> > > I don't mind you description. Yet your code change references 1.4.1:
> > >     SRT_VERSION_VALUE >= 0x010401
> > > while I am trying to make the point that 1.4.0 also needs this change
> > > (or 1.3.0 in one case, which is already ensured by #if).
> > >
> >
> > After double-check, I think the patch is Ok, in fact, libsrt keeps the
> > deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
> > options in libsrt 1.3.3/1.3.4/1.4.0) until commit
> > 0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
> > 1.3.3/1.3.4/1.4.0 is OK with the patch.
> Ping
I'll apply it tomorrow if don't object, thx
mypopy@gmail.com July 28, 2020, 1:56 a.m. UTC | #10
On Mon, Jul 27, 2020 at 7:37 PM mypopy@gmail.com <mypopy@gmail.com> wrote:
>
> On Sat, Jul 18, 2020 at 8:31 PM mypopy@gmail.com <mypopy@gmail.com> wrote:
> >
> > On Thu, Jul 16, 2020 at 9:35 AM mypopy@gmail.com <mypopy@gmail.com> wrote:
> > >
> > > On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick <barsnick@gmx.net> wrote:
> > > >
> > > > On Sun, Jul 12, 2020 at 22:44:46 +0800, mypopy@gmail.com wrote:
> > > > > Maybe I give an inaccurate description in the commit message, in fact,
> > > > > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > > > > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
> > > >
> > > > I don't mind you description. Yet your code change references 1.4.1:
> > > >     SRT_VERSION_VALUE >= 0x010401
> > > > while I am trying to make the point that 1.4.0 also needs this change
> > > > (or 1.3.0 in one case, which is already ensured by #if).
> > > >
> > >
> > > After double-check, I think the patch is Ok, in fact, libsrt keeps the
> > > deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
> > > options in libsrt 1.3.3/1.3.4/1.4.0) until commit
> > > 0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
> > > 1.3.3/1.3.4/1.4.0 is OK with the patch.
> > Ping
> I'll apply it tomorrow if don't object, thx
Pushed, thx
Gyan Doshi Sept. 15, 2020, 6:22 a.m. UTC | #11
This should be backported to 4.3 and other releases whose builds fail.

Gyan

On 12-07-2020 11:33 am, Jun Zhao wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> libsrt 1.4.1 changed the:
> SRTO_SMOOTHER   -> SRTO_CONGESTION
> SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION
> SRTO_TSBPDDELAY -> SRTO_LATENCY
> and removed the front of deprecated option, it's lead to build fail
>
> fix #8760
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>   libavformat/libsrt.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
> index 4de575b..4719ce0 100644
> --- a/libavformat/libsrt.c
> +++ b/libavformat/libsrt.c
> @@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
>           (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
>           (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
>   #if SRT_VERSION_VALUE >= 0x010302
> +#if SRT_VERSION_VALUE >= 0x010401
> +        (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
> +#else
>           /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */
>           (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
> +#endif
>           (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) ||
>           (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) ||
>   #endif
> @@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
>           (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
>           (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) ||
>           (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
> +#if SRT_VERSION_VALUE >= 0x010401
> +        (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
> +#else
>           (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
> +#endif
>           (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) ||
>           (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) ||
>           ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) {
mypopy@gmail.com Sept. 15, 2020, 7:17 a.m. UTC | #12
On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi <ffmpeg@gyani.pro> wrote:
>
> This should be backported to 4.3 and other releases whose builds fail.
>
> Gyan

Will backporting, thx
Gyan Doshi Sept. 17, 2020, 7:37 a.m. UTC | #13
On 15-09-2020 12:47 pm, mypopy@gmail.com wrote:
> On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi <ffmpeg@gyani.pro> wrote:
>> This should be backported to 4.3 and other releases whose builds fail.
>>
>> Gyan
> Will backporting, thx

Ping.

4.3.1 build with libsrt remains broken.

Thanks,
Gyan
Gyan Doshi Sept. 20, 2020, 5:27 p.m. UTC | #14
On 17-09-2020 01:07 pm, Gyan Doshi wrote:
>
>
> On 15-09-2020 12:47 pm, mypopy@gmail.com wrote:
>> On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi <ffmpeg@gyani.pro> wrote:
>>> This should be backported to 4.3 and other releases whose builds fail.
>>>
>>> Gyan
>> Will backporting, thx
>
> Ping.
>
> 4.3.1 build with libsrt remains broken.

I'll test and apply this myself, I guess.

Gyan
mypopy@gmail.com Sept. 21, 2020, 2:04 a.m. UTC | #15
On Mon, Sep 21, 2020 at 1:27 AM Gyan Doshi <ffmpeg@gyani.pro> wrote:
>
>
>
> On 17-09-2020 01:07 pm, Gyan Doshi wrote:
> >
> >
> > On 15-09-2020 12:47 pm, mypopy@gmail.com wrote:
> >> On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi <ffmpeg@gyani.pro> wrote:
> >>> This should be backported to 4.3 and other releases whose builds fail.
> >>>
> >>> Gyan
> >> Will backporting, thx
> >
> > Ping.
> >
> > 4.3.1 build with libsrt remains broken.
>
> I'll test and apply this myself, I guess.
>

Busy with other urgent things last week, sorry, will test /back
porting then push to 4.3.1
mypopy@gmail.com Sept. 21, 2020, 3:16 a.m. UTC | #16
On Mon, Sep 21, 2020 at 1:27 AM Gyan Doshi <ffmpeg@gyani.pro> wrote:
>
>
>
> On 17-09-2020 01:07 pm, Gyan Doshi wrote:
> >
> >
> > On 15-09-2020 12:47 pm, mypopy@gmail.com wrote:
> >> On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi <ffmpeg@gyani.pro> wrote:
> >>> This should be backported to 4.3 and other releases whose builds fail.
> >>>
> >>> Gyan
> >> Will backporting, thx
> >
> > Ping.
> >
> > 4.3.1 build with libsrt remains broken.
>
> I'll test and apply this myself, I guess.
>
Done, thx
diff mbox series

Patch

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 4de575b..4719ce0 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -313,8 +313,12 @@  static int libsrt_set_options_pre(URLContext *h, int fd)
         (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
         (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
 #if SRT_VERSION_VALUE >= 0x010302
+#if SRT_VERSION_VALUE >= 0x010401
+        (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
+#else
         /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */
         (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
+#endif
         (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) ||
         (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) ||
 #endif
@@ -333,7 +337,11 @@  static int libsrt_set_options_pre(URLContext *h, int fd)
         (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
         (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) ||
         (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
+#if SRT_VERSION_VALUE >= 0x010401
+        (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
+#else
         (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
+#endif
         (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) ||
         (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) ||
         ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) {