diff --git a/ffplay.c b/ffplay.c
index cc4e853440d491e889c1c4f5d85a564d02826567..e2913aaad995dd3e6318179a47a4b0c2761a2fe4 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2391,14 +2391,6 @@ static void opt_frame_pix_fmt(const char *arg)
     frame_pix_fmt = avcodec_get_pix_fmt(arg);
 }
 
-#ifdef CONFIG_RTSP_DEMUXER
-static void opt_rtp_tcp(void)
-{
-    /* only tcp protocol */
-    rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_TCP);
-}
-#endif
-
 static void opt_sync(const char *arg)
 {
     if (!strcmp(arg, "audio"))
@@ -2476,9 +2468,6 @@ const OptionDef options[] = {
     { "idct", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&idct}, "set idct algo",  "algo" },
     { "er", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_resilience}, "set error detection threshold (0-4)",  "threshold" },
     { "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options",  "bit_mask" },
-#ifdef CONFIG_RTSP_DEMUXER
-    { "rtp_tcp", OPT_EXPERT, {(void*)&opt_rtp_tcp}, "force RTP/TCP protocol usage", "" },
-#endif
     { "sync", HAS_ARG | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" },
     { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
     { NULL, },
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index ff66f4bb44a3c0c5afa7b44f5638dc16bc5e47cb..14f0a5ce43a0dfb88c96754bb12f1904de459ba8 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -77,7 +77,9 @@ static int rtsp_read_play(AVFormatContext *s);
 /* XXX: currently, the only way to change the protocols consists in
    changing this variable */
 
+#if LIBAVFORMAT_VERSION_INT < (53 << 16)
 int rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_UDP);
+#endif
 
 static int rtsp_probe(AVProbeData *p)
 {
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 67d37d6871d322e5eb75782acfc787a4071fda40..6adadbc8159a1725b8f75ad3318aae5d538389a0 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -81,7 +81,9 @@ typedef int FFRTSPCallback(enum RTSPCallbackAction action,
 int rtsp_init(void);
 void rtsp_parse_line(RTSPHeader *reply, const char *buf);
 
+#if LIBAVFORMAT_VERSION_INT < (53 << 16)
 extern int rtsp_default_protocols;
+#endif
 extern int rtsp_rtp_port_min;
 extern int rtsp_rtp_port_max;