From 27000636556d8fb81a57e9eae71c79637959ced6 Mon Sep 17 00:00:00 2001 From: Jeremy Morton Date: Tue, 26 Jan 2010 15:51:54 +0000 Subject: Don't use tcp_fd if we're not using TCP-based connections (e.g. when reading direct SDP files to set up UDP-based RTP-streams). Fixes issue 1713. Patch by Jeremy Morton . Originally committed as revision 21461 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c9fb0974ba..d1738dd046 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1457,7 +1457,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, } } #if CONFIG_RTSP_DEMUXER - if (FD_ISSET(tcp_fd, &rfds)) { + if (tcp_fd != -1 && FD_ISSET(tcp_fd, &rfds)) { RTSPMessageHeader reply; rtsp_read_reply(s, &reply, NULL, 0); -- cgit v1.2.3