From 2f41eaa9c6b5699ed7c3c09b1a39b3322d8e7175 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Wed, 17 Oct 2012 16:46:29 +0300 Subject: rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 160c0f7bbc..bbe08e686e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1808,7 +1808,8 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) rt->recvbuf_pos += ret; ret = rt->recvbuf_pos < rt->recvbuf_len; } - } + } else + ret = -1; if (ret == 0) { rt->cur_transport_priv = NULL; return 0; -- cgit v1.2.3