summaryrefslogtreecommitdiff
path: root/avconv_filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/avconv_filter.c b/avconv_filter.c
index 50e1e7315a..9cef1afc8a 100644
--- a/avconv_filter.c
+++ b/avconv_filter.c
@@ -23,8 +23,12 @@
#include "libavfilter/avfilter.h"
#include "libavfilter/avfiltergraph.h"
+#include "libavresample/avresample.h"
+
#include "libavutil/avassert.h"
+#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
+#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/samplefmt.h"
@@ -501,9 +505,21 @@ int configure_filtergraph(FilterGraph *fg)
if (simple) {
OutputStream *ost = fg->outputs[0]->ost;
- char args[255];
+ char args[512];
+ AVDictionaryEntry *e = NULL;
+ const AVClass *rc = avresample_get_class();
+
snprintf(args, sizeof(args), "flags=0x%X", (unsigned)ost->sws_flags);
fg->graph->scale_sws_opts = av_strdup(args);
+
+ args[0] = '\0';
+ while ((e = av_dict_get(fg->outputs[0]->ost->resample_opts, "", e,
+ AV_DICT_IGNORE_SUFFIX))) {
+ av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
+ }
+ if (strlen(args))
+ args[strlen(args) - 1] = '\0';
+ fg->graph->resample_lavr_opts = av_strdup(args);
}
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)