[FFmpeg-devel] [PATCH] parsing code: add '\r' as whitespace

Muhammad Faiz mfcc64 at gmail.com
Thu May 5 16:49:18 CEST 2016


for compatibility with platforms that treat it
as newline

Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
---
 libavfilter/graphparser.c | 2 +-
 libavutil/avstring.c      | 2 +-
 libavutil/bprint.c        | 2 +-
 libavutil/opt.c           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 03062af..04b4272 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -27,7 +27,7 @@
 #include "libavutil/mem.h"
 #include "avfilter.h"
 
-#define WHITESPACES " \n\t"
+#define WHITESPACES " \n\t\r"
 
 /**
  * Link two filters together.
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 85fb3e9..b4dace0 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -144,7 +144,7 @@ char *av_d2str(double d)
     return str;
 }
 
-#define WHITESPACES " \n\t"
+#define WHITESPACES " \n\t\r"
 
 char *av_get_token(const char **buf, const char *term)
 {
diff --git a/libavutil/bprint.c b/libavutil/bprint.c
index 0a0d078..7ef84d4 100644
--- a/libavutil/bprint.c
+++ b/libavutil/bprint.c
@@ -260,7 +260,7 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str)
     return ret;
 }
 
-#define WHITESPACES " \n\t"
+#define WHITESPACES " \n\t\r"
 
 void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars,
                       enum AVEscapeMode mode, int flags)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index ae92da0..70a68d9 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1395,7 +1395,7 @@ int av_set_options_string(void *ctx, const char *opts,
     return count;
 }
 
-#define WHITESPACES " \n\t"
+#define WHITESPACES " \n\t\r"
 
 static int is_key_char(char c)
 {
-- 
2.5.0



More information about the ffmpeg-devel mailing list