summaryrefslogtreecommitdiff
path: root/libavfilter/avfiltergraph.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-02-23 23:45:21 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-02-23 23:45:21 +0000
commit39c07b8e44e2c93fb6b1fc5d8f5d696a64e47eee (patch)
tree22bd6a097e12c78cba94da698407305fa8ae5a58 /libavfilter/avfiltergraph.c
parentcacb82134e486284438ff23395faa746f461e657 (diff)
Implement in AVFilterGraph the scale_sws_opts field, and pass its
value in the args for the auto-inserted scale filters. Originally committed as revision 17547 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 72c0fd2ca2..e97507dcf4 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -30,6 +30,7 @@ void avfilter_destroy_graph(AVFilterGraph *graph)
{
for(; graph->filter_count > 0; graph->filter_count --)
avfilter_destroy(graph->filters[graph->filter_count - 1]);
+ av_freep(&graph->scale_sws_opts);
av_freep(&graph->filters);
}
@@ -111,13 +112,15 @@ static int query_formats(AVFilterGraph *graph)
if(!avfilter_merge_formats(link->in_formats,
link->out_formats)) {
AVFilterContext *scale;
+ char scale_args[256];
/* couldn't merge format lists. auto-insert scale filter */
snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
scaler_count);
scale =
avfilter_open(avfilter_get_by_name("scale"),inst_name);
- if(!scale || scale->filter->init(scale, NULL, NULL) ||
+ snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
+ if(!scale || scale->filter->init(scale, scale_args, NULL) ||
avfilter_insert_filter(link, scale, 0, 0)) {
avfilter_destroy(scale);
return -1;