Browse Source

Make parse_filter() parsing more robust.

Add ';' and '\n' to the terminating characters for the name of a
filter, and ';' to the terminating characters for its args.

Originally committed as revision 20800 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Stefano Sabatini 15 years ago
parent
commit
15a316c014
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavfilter/graphparser.c

+ 2
- 2
libavfilter/graphparser.c View File

@@ -120,12 +120,12 @@ static AVFilterContext *parse_filter(const char **buf, AVFilterGraph *graph,
int index, AVClass *log_ctx) int index, AVClass *log_ctx)
{ {
char *opts = NULL; char *opts = NULL;
char *name = av_get_token(buf, "=,[");
char *name = av_get_token(buf, "=,;[\n");
AVFilterContext *ret; AVFilterContext *ret;


if(**buf == '=') { if(**buf == '=') {
(*buf)++; (*buf)++;
opts = av_get_token(buf, "[],\n");
opts = av_get_token(buf, "[],;\n");
} }


ret = create_filter(graph, index, name, opts, log_ctx); ret = create_filter(graph, index, name, opts, log_ctx);


Loading…
Cancel
Save