summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.h2
-rw-r--r--libavfilter/avfiltergraph.c5
-rw-r--r--libavfilter/avfiltergraph.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 61ce1ad..9f455bb 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -23,7 +23,7 @@
#define AVFILTER_AVFILTER_H
#define LIBAVFILTER_VERSION_MAJOR 0
-#define LIBAVFILTER_VERSION_MINOR 3
+#define LIBAVFILTER_VERSION_MINOR 4
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 72c0fd2..e97507d 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;
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h
index 716d919..88820ac 100644
--- a/libavfilter/avfiltergraph.h
+++ b/libavfilter/avfiltergraph.h
@@ -27,6 +27,8 @@
typedef struct AVFilterGraph {
unsigned filter_count;
AVFilterContext **filters;
+
+ char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
} AVFilterGraph;
/**
OpenPOWER on IntegriCloud