[FFmpeg-cvslog] rtsp: check ffurl_get_file_handle() return value

Vittorio Giovara git at videolan.org
Fri Dec 19 05:12:30 CET 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Wed Dec 17 15:19:39 2014 +0100| [76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b] | committer: Vittorio Giovara

rtsp: check ffurl_get_file_handle() return value

CC: libav-stable at libav.org
Bug-Id: CID 717844

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b
---

 libavformat/rtsp.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8276286..2200f6e 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1751,6 +1751,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);



More information about the ffmpeg-cvslog mailing list