You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
avformat/sctp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -1535,7 +1535,15 @@ The accepted URL syntax is:
|
||||
sctp://@var{host}:@var{port}[?@var{options}]
|
||||
@end example
|
||||
|
||||
The protocol accepts the following options:
|
||||
@var{options} contains a list of &-separated options of the form
|
||||
@var{key}=@var{val}. Standard percent-encoding (and using the plus sign for
|
||||
space) can be used to escape keys and values.
|
||||
|
||||
Options can also can be specified via command line options (or in code via
|
||||
@code{AVOption}s).
|
||||
|
||||
The list of supported options follows.
|
||||
|
||||
@table @option
|
||||
@item listen
|
||||
If set to any value, listen for an incoming connection. Outgoing connection is done by default.
|
||||
|
@@ -185,7 +185,6 @@ static int sctp_open(URLContext *h, const char *uri, int flags)
|
||||
int fd = -1;
|
||||
SCTPContext *s = h->priv_data;
|
||||
const char *p;
|
||||
char buf[256];
|
||||
int ret;
|
||||
char hostname[1024], proto[1024], path[1024];
|
||||
char portstr[10];
|
||||
@@ -201,10 +200,9 @@ static int sctp_open(URLContext *h, const char *uri, int flags)
|
||||
|
||||
p = strchr(uri, '?');
|
||||
if (p) {
|
||||
if (av_find_info_tag(buf, sizeof(buf), "listen", p))
|
||||
s->listen = 1;
|
||||
if (av_find_info_tag(buf, sizeof(buf), "max_streams", p))
|
||||
s->max_streams = strtol(buf, NULL, 10);
|
||||
ret = ff_parse_opts_from_query_string(s, p, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
|
Reference in New Issue
Block a user