OSDN Git Service

avfilter/graphparser: remove '\n' from parse_filter
authorMuhammad Faiz <mfcc64@gmail.com>
Thu, 5 May 2016 07:07:21 +0000 (14:07 +0700)
committerMuhammad Faiz <mfcc64@gmail.com>
Mon, 13 Jun 2016 09:17:53 +0000 (16:17 +0700)
this allow a filter to be written like this:
aformat =
    sample_fmts  = fltp|flt:
    sample_rates = 44100|44800

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
libavfilter/graphparser.c

index ce5be1b..04b4272 100644 (file)
@@ -165,12 +165,12 @@ static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGr
                         int index, void *log_ctx)
 {
     char *opts = NULL;
-    char *name = av_get_token(buf, "=,;[\n");
+    char *name = av_get_token(buf, "=,;[");
     int ret;
 
     if (**buf == '=') {
         (*buf)++;
-        opts = av_get_token(buf, "[],;\n");
+        opts = av_get_token(buf, "[],;");
     }
 
     ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);