diff --git a/ffserver.c b/ffserver.c
index 1fc3e656c2ba009608e7fdfc92c2ba543cde414d..8bfea66c2a48de168b2f28f7ece972bac29ec6ed 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -103,6 +103,11 @@ static const char *http_state[] = {
 
 #define SYNC_TIMEOUT (10 * 1000)
 
+typedef struct RTSPActionServerSetup {
+    uint32_t ipaddr;
+    char transport_option[512];
+} RTSPActionServerSetup;
+
 typedef struct {
     int64_t count1, count2;
     int64_t time1, time2;
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 83d76261063e301c8e40dca3d012ef358683b3e8..83d0a39184234a088b43c8c09a8f291935440f6d 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -128,24 +128,6 @@ typedef struct RTSPStream {
     PayloadContext *dynamic_protocol_context; ///< Only valid if it's a dynamic protocol. (This is any private data associated with the dynamic protocol)
 } RTSPStream;
 
-/** the callback can be used to extend the connection setup/teardown step */
-enum RTSPCallbackAction {
-    RTSP_ACTION_SERVER_SETUP,
-    RTSP_ACTION_SERVER_TEARDOWN,
-    RTSP_ACTION_CLIENT_SETUP,
-    RTSP_ACTION_CLIENT_TEARDOWN,
-};
-
-typedef struct RTSPActionServerSetup {
-    uint32_t ipaddr;
-    char transport_option[512];
-} RTSPActionServerSetup;
-
-typedef int FFRTSPCallback(enum RTSPCallbackAction action,
-                           const char *session_id,
-                           char *buf, int buf_size,
-                           void *arg);
-
 int rtsp_init(void);
 void rtsp_parse_line(RTSPHeader *reply, const char *buf);