X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Flibsrt.c;h=b5568089fa0cc05492ecb46ffdca7271b0b41f3f;hb=3fe37033b982efa3e76e6dec977dc5048597937b;hp=fe3b3121515634df11924c8266022eabccce201a;hpb=bec3b2041dcc20ab4b06a6b31d09130e1a7166c3;p=ffmpeg diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index fe3b3121515..b5568089fa0 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -336,7 +336,8 @@ static int libsrt_set_options_pre(URLContext *h, int fd) (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) || (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || (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)) { + (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;