avformat/libsrt: fix merge of payload_size option
Fixes a compile error and re-adds pkt_size as a url?option as well. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
11cec34829
commit
23fe072e43
@ -309,8 +309,8 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
|
||||
(s->peerlatency >= 0 && libsrt_setsockopt(h, fd, SRTO_PEERLATENCY, "SRTO_PEERLATENCY", &peerlatency, sizeof(peerlatency)) < 0) ||
|
||||
(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) {
|
||||
(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)) {
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
return 0;
|
||||
@ -507,7 +507,8 @@ static int libsrt_open(URLContext *h, const char *uri, int flags)
|
||||
if (av_find_info_tag(buf, sizeof(buf), "connect_timeout", p)) {
|
||||
s->connect_timeout = strtol(buf, NULL, 10);
|
||||
}
|
||||
if (av_find_info_tag(buf, sizeof(buf), "payload_size", p)) {
|
||||
if (av_find_info_tag(buf, sizeof(buf), "payload_size", p) ||
|
||||
av_find_info_tag(buf, sizeof(buf), "pkt_size", p)) {
|
||||
s->payload_size = strtol(buf, NULL, 10);
|
||||
}
|
||||
if (av_find_info_tag(buf, sizeof(buf), "mode", p)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user