diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index edb3142b3c..6da03d26fe 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1919,7 +1919,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));