Mercurial > libavformat.hg
changeset 4898:609322be76a6 libavformat
Fix crash when receiving from SDP
author | lucabe |
---|---|
date | Mon, 20 Apr 2009 20:06:55 +0000 |
parents | d5c3a291ff4d |
children | 52992e9a0109 |
files | rtsp.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Sun Apr 19 21:24:36 2009 +0000 +++ b/rtsp.c Mon Apr 20 20:06:55 2009 +0000 @@ -1375,8 +1375,13 @@ if (url_interrupt_cb()) return AVERROR(EINTR); FD_ZERO(&rfds); - tcp_fd = fd_max = url_get_file_handle(rt->rtsp_hd); - FD_SET(tcp_fd, &rfds); + if (rt->rtsp_hd) { + tcp_fd = fd_max = url_get_file_handle(rt->rtsp_hd); + FD_SET(tcp_fd, &rfds); + } else { + fd_max = 0; + tcp_fd = -1; + } for(i = 0; i < rt->nb_rtsp_streams; i++) { rtsp_st = rt->rtsp_streams[i]; if (rtsp_st->rtp_handle) {