Module: libav Branch: master Commit: 90b15f60bf4919deaed66d868e18107eba371da7
Author: Sven Dueking <[email protected]> Committer: Luca Barbato <[email protected]> Date: Thu Feb 7 09:38:16 2019 +0100 srt: Set srto_sender flag to sender srt socket SRT API Documentation: This flag is superfluous if both parties are at least version 1.3.0 (this shall be enforced by setting this value to SRTO_MINVERSION if you expect that it be true) and therefore support HSv5 handshake, where the SRT extended handshake is done with the overall handshake process. This flag is however obligatory if at least one party may be using SRT below version 1.3.0 and does not support HSv5. --- libavformat/libsrt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index f901bba..dd91eb4 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -300,7 +300,8 @@ static int libsrt_set_options_pre(URLContext *h, int fd) (s->tlpktdrop >= 0 && libsrt_setsockopt(h, fd, SRTO_TLPKTDROP, "SRTO_TLPKDROP", &s->tlpktdrop, sizeof(s->tlpktdrop)) < 0) || (s->nakreport >= 0 && libsrt_setsockopt(h, fd, SRTO_NAKREPORT, "SRTO_NAKREPORT", &s->nakreport, sizeof(s->nakreport)) < 0) || (connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, "SRTO_CONNTIMEO", &connect_timeout, sizeof(connect_timeout)) < 0) || - (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 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)) { return AVERROR(EIO); } return 0; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
