diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-26 00:00:06 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-26 00:00:06 +0400 |
commit | f7d4e26c6a0a11c255e22994fabd97a4e62e3d01 (patch) | |
tree | 65c18e3f9064ed481b0001beac05e194232260eb /libavformat/tcp.c | |
parent | 9746f87f154029ed5866cbc02ba0d57f5b5c283f (diff) | |
parent | 758377a2b79a35386978b0af1196d36cbcfb8f64 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rtmp: Add a new option 'rtmp_pageurl'
doc: Update the description of the rtmp_tcurl option
rtmp: Make the description of the rtmp_tcurl option more generic
libfdk-aacenc: add LATM/LOAS encapsulation support
sctp: add port missing error message
tcp: add port missing error message
avfilter: Fix printf format string conversion specifier
Conflicts:
libavcodec/version.h
libavfilter/avfilter.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r-- | libavformat/tcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index 70a50159eb..8cd217b697 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -49,9 +49,12 @@ static int tcp_open(URLContext *h, const char *uri, int flags) av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, path, sizeof(path), uri); - if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) + if (strcmp(proto, "tcp")) return AVERROR(EINVAL); - + if (port <= 0 || port >= 65536) { + av_log(h, AV_LOG_ERROR, "Port missing in uri\n"); + return AVERROR(EINVAL); + } p = strchr(uri, '?'); if (p) { if (av_find_info_tag(buf, sizeof(buf), "listen", p)) |