summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-19 05:04:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-19 05:04:24 +0100
commitbf6e332cb4b7a2aabff6373eaa4b0b768c53c102 (patch)
treec5cf12d873aba0c65afdf4267f89d05a48c96a3a /libavformat/rtsp.c
parent988d27b8029d9b4ccb13e792004cc8375b835eac (diff)
parent76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b (diff)
Merge commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b'
* commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b': rtsp: check ffurl_get_file_handle() return value Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index ae62252a22..e5fc123ba7 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1752,6 +1752,10 @@ redirect:
rt->seq = 0;
tcp_fd = ffurl_get_file_handle(rt->rtsp_hd);
+ if (tcp_fd < 0) {
+ err = tcp_fd;
+ goto fail;
+ }
if (!getpeername(tcp_fd, (struct sockaddr*) &peer, &peer_len)) {
getnameinfo((struct sockaddr*) &peer, peer_len, host, sizeof(host),
NULL, 0, NI_NUMERICHOST);