From 405ea5dcaed413fc07898b0a138505e53bd942a2 Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Sun, 20 Jun 2010 12:12:22 -0700
Subject: [PATCH 1/2] Move skip_spaces to libavformat/internal.h

---
 libavformat/internal.h |   13 +++++++++++++
 libavformat/rtsp.c     |   13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libavformat/internal.h b/libavformat/internal.h
index 4489ffe..4ca5c55 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -174,4 +174,17 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
 int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
                      AVFormatContext *src);
 
+#define SPACE_CHARS " \t\r\n"
+/* we use memchr() instead of strchr() here because strchr() will return
+ * the terminating '\0' of SPACE_CHARS instead of NULL if c is '\0'. */
+#define redir_isspace(c) memchr(SPACE_CHARS, c, 4)
+static inline void skip_spaces(const char **pp)
+{
+    const char *p;
+    p = *pp;
+    while (redir_isspace(*p))
+        p++;
+    *pp = p;
+}
+
 #endif /* AVFORMAT_INTERNAL_H */
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9801fc9..a56bf44 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -53,19 +53,6 @@ int rtsp_default_protocols = (1 << RTSP_LOWER_TRANSPORT_UDP);
 #define READ_PACKET_TIMEOUT_S 10
 #define MAX_TIMEOUTS READ_PACKET_TIMEOUT_S * 1000 / SELECT_TIMEOUT_MS
 
-#define SPACE_CHARS " \t\r\n"
-/* we use memchr() instead of strchr() here because strchr() will return
- * the terminating '\0' of SPACE_CHARS instead of NULL if c is '\0'. */
-#define redir_isspace(c) memchr(SPACE_CHARS, c, 4)
-static void skip_spaces(const char **pp)
-{
-    const char *p;
-    p = *pp;
-    while (redir_isspace(*p))
-        p++;
-    *pp = p;
-}
-
 static void get_word_until_chars(char *buf, int buf_size,
                                  const char *sep, const char **pp)
 {
-- 
1.7.0.4

