History

Rename avfilter_create to avfilter_open and remove the wrapper function avfilter_create_by_name.

Commited in SoC by Bobby Bingham on 2007-08-17 23:39:55 Originally committed as revision 12703 to svn://svn.ffmpeg.org/ffmpeg/trunk

Vitor Sessak committed 18 years ago

Commit d1633ac1 parent 66d9e9b1 file · +9 −4Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+9−4
@@ -430,6 +430,7 @@ int avfilter_graph_config_links(AVFilterContext *graphctx) · 429 unmodified lines
430430
431431 static AVFilterContext *create_filter_with_args(const char *filt, void *opaque)
432432 {
433+ AVFilter *filterdef;
433434 AVFilterContext *ret;
434435 char *filter = av_strdup(filt); /* copy - don't mangle the input string */
435436 char *name, *args;
@@ -446,7 +447,8 @@ static AVFilterContext *create_filter_with_args(const char *filt, void *opaque) · 10 unmodified lines
446447 av_log(NULL, AV_LOG_INFO, "creating filter \"%s\" with args \"%s\"\n",
447448 name, args ? args : "(none)");
448449
449− if((ret = avfilter_create_by_name(name, NULL))) {
450+ if((filterdef = avfilter_get_by_name(name)) &&
451+ (ret = avfilter_open(filterdef, NULL))) {
450452 if(avfilter_init_filter(ret, args, opaque)) {
451453 av_log(NULL, AV_LOG_ERROR, "error initializing filter!\n");
452454 avfilter_destroy(ret);
@@ -545,7 +547,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque) · 92 unmodified lines
545547 if(!args)
546548 return 0;
547549
548− if(!(gctx->link_filter = avfilter_create(&vf_graph_dummy, NULL)))
550+ if(!(gctx->link_filter = avfilter_open(&vf_graph_dummy, NULL)))
549551 return -1;
550552 if(avfilter_init_filter(gctx->link_filter, NULL, ctx))
551553 goto fail;
@@ -578,9 +580,12 @@ static int graph_load_from_desc(AVFilterContext *ctx, AVFilterGraphDesc *desc) · 26 unmodified lines
578580 AVFilterGraphDescExport *curpad;
579581 AVFilterContext *filt, *filtb;
580582
583+ AVFilter *filterdef;
584+
581585 /* create all filters */
582586 for(curfilt = desc->filters; curfilt; curfilt = curfilt->next) {
583− if(!(filt = avfilter_create_by_name(curfilt->filter, curfilt->name))) {
587+ if(!(filterdef = avfilter_get_by_name(curfilt->filter)) ||
588+ !(filt = avfilter_open(filterdef, curfilt->name))) {
584589 av_log(ctx, AV_LOG_ERROR, "error creating filter\n");
585590 goto fail;
586591 }
@@ -639,7 +644,7 @@ static int init_desc(AVFilterContext *ctx, const char *args, void *opaque) · 52 unmodified lines
639644 if(!opaque)
640645 return -1;
641646
642− if(!(gctx->link_filter = avfilter_create(&vf_graph_dummy, NULL)))
647+ if(!(gctx->link_filter = avfilter_open(&vf_graph_dummy, NULL)))
643648 return -1;
644649 if(avfilter_init_filter(gctx->link_filter, NULL, ctx))
645650 goto fail;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t