mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
sctp: add port missing error message
Without this patch a user a bit absent-minded may not notice that the connection doesn't work because the port is missing. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
f9a9a14862
commit
ecfff0e992
@ -170,8 +170,12 @@ static int sctp_open(URLContext *h, const char *uri, int flags)
|
|||||||
|
|
||||||
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
|
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
|
||||||
&port, path, sizeof(path), uri);
|
&port, path, sizeof(path), uri);
|
||||||
if (strcmp(proto,"sctp") || port <= 0 || port >= 65536)
|
if (strcmp(proto, "sctp"))
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
if (port <= 0 || port >= 65536) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "Port missing in uri\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
s->max_streams = 0;
|
s->max_streams = 0;
|
||||||
p = strchr(uri, '?');
|
p = strchr(uri, '?');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user