rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
[ffmpeg.git] / libavformat / rtsp.c
index 160c0f7bbc4a4ab3a77f302ae6aa6c3d6d232d85..bbe08e686e254fa9efbbfd566ac04a82d56d0686 100644 (file)
@@ -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;