From 62c3c8ca78ee2da7dc20c2d6371866266c82966d Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 6 Apr 2012 22:35:48 +0300 Subject: rtsp: Don't use uninitialized data if there are no streams MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 403f038875..9ee7a758e4 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1391,7 +1391,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, goto fail; } - if (reply->timeout > 0) + if (rt->nb_rtsp_streams && reply->timeout > 0) rt->timeout = reply->timeout; if (rt->server_type == RTSP_SERVER_REAL) -- cgit v1.2.3