[FFmpeg-cvslog] r18635 - trunk/libavformat/rtsp.c

lucabe subversion
Mon Apr 20 22:06:56 CEST 2009


Author: lucabe
Date: Mon Apr 20 22:06:55 2009
New Revision: 18635

Log:
Fix crash when receiving from SDP

Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Mon Apr 20 19:13:21 2009	(r18634)
+++ trunk/libavformat/rtsp.c	Mon Apr 20 22:06:55 2009	(r18635)
@@ -1375,8 +1375,13 @@ static int udp_read_packet(AVFormatConte
         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) {



More information about the ffmpeg-cvslog mailing list