diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index d601d63a89..ea989e4925 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1813,7 +1813,8 @@ redirect: } else if (!strcmp(proto, "satip")) { av_strlcpy(proto, "rtsp", sizeof(proto)); rt->server_type = RTSP_SERVER_SATIP; - } + } else if (strcmp(proto, "rtsp")) + return AVERROR_INVALIDDATA; if (*auth) { av_strlcpy(rt->auth, auth, sizeof(rt->auth));