rtsp: Use ff_rtsp_undo_setup in the cleanup code in ff_rtsp_make_request
authorMartin Storsjo <martin@martin.st>
Mon, 24 Jan 2011 09:49:03 +0000 (09:49 +0000)
committerJanne Grunau <janne-ffmpeg@jannau.net>
Mon, 24 Jan 2011 21:46:43 +0000 (22:46 +0100)
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
libavformat/rtsp.c

index dcceb68..dddaaf4 100644 (file)
@@ -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;
 }