From 9f1223562e134bac6345a465870b9d56ff7d60cf Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 18 Dec 2012 21:27:35 -0500 Subject: lavfi: connect libavresample options to af_resample via AVFilterGraph --- libavfilter/avfiltergraph.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libavfilter/avfiltergraph.c') diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index f5c9984b6a..97af5d0323 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -54,6 +54,7 @@ void avfilter_graph_free(AVFilterGraph **graph) for (; (*graph)->filter_count > 0; (*graph)->filter_count--) avfilter_free((*graph)->filters[(*graph)->filter_count - 1]); av_freep(&(*graph)->scale_sws_opts); + av_freep(&(*graph)->resample_lavr_opts); av_freep(&(*graph)->filters); av_freep(graph); } @@ -235,8 +236,13 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) snprintf(inst_name, sizeof(inst_name), "auto-inserted resampler %d", resampler_count++); + scale_args[0] = '\0'; + if (graph->resample_lavr_opts) + snprintf(scale_args, sizeof(scale_args), "%s", + graph->resample_lavr_opts); if ((ret = avfilter_graph_create_filter(&convert, filter, - inst_name, NULL, NULL, graph)) < 0) + inst_name, scale_args, + NULL, graph)) < 0) return ret; break; default: -- cgit v1.2.3