aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-02 20:12:27 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-02 20:12:27 +0000
commit037be76e1588fc8135dd307ba0be4c792b3e93e6 (patch)
tree80f3a139615d0c530fd2399ce8daf437271ab58c /ffplay.c
parent9398024c048092786f1dcf0809fb55bdbf96a70f (diff)
downloadffmpeg-037be76e1588fc8135dd307ba0be4c792b3e93e6.tar.gz
Add avfilter_graph_create_filter().
Originally committed as revision 25862 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ffplay.c b/ffplay.c
index d478bcb2a4..38a2fe137f 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1798,12 +1798,12 @@ static int video_thread(void *arg)
snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
graph->scale_sws_opts = av_strdup(sws_flags_str);
- if (avfilter_open(&filt_src, &input_filter, "src") < 0) goto the_end;
- if (avfilter_open(&filt_out, &ffsink , "out") < 0) goto the_end;
-
- if(avfilter_init_filter(filt_src, NULL, is)) goto the_end;
- if(avfilter_init_filter(filt_out, NULL, &ffsink_ctx)) goto the_end;
-
+ if (avfilter_graph_create_filter(&filt_src, &input_filter, "src",
+ NULL, is, graph) < 0)
+ goto the_end;
+ if (avfilter_graph_create_filter(&filt_out, &ffsink, "out",
+ NULL, &ffsink_ctx, graph) < 0)
+ goto the_end;
if(vfilters) {
AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut));
@@ -1825,8 +1825,6 @@ static int video_thread(void *arg)
} else {
if(avfilter_link(filt_src, 0, filt_out, 0) < 0) goto the_end;
}
- avfilter_graph_add_filter(graph, filt_src);
- avfilter_graph_add_filter(graph, filt_out);
if (avfilter_graph_config(graph, NULL) < 0)
goto the_end;