[FFmpeg-devel] [PATCH 3/5] rtsp: Use ff_rtsp_undo_setup in the cleanup code in ff_rtsp_make_request

Martin Storsjö martin
Mon Jan 24 11:49:03 CET 2011


---
 libavformat/rtsp.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index dcceb68..dddaaf4 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1271,12 +1271,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
     return 0;
 
 fail:
-    for (i = 0; i < rt->nb_rtsp_streams; i++) {
-        if (rt->rtsp_streams[i]->rtp_handle) {
-            url_close(rt->rtsp_streams[i]->rtp_handle);
-            rt->rtsp_streams[i]->rtp_handle = NULL;
-        }
-    }
+    ff_rtsp_undo_setup(s);
     return err;
 }
 
-- 
1.7.3.1




More information about the ffmpeg-devel mailing list