diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 19:07:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 20:31:56 +0100 |
commit | ad899522ffa7f0039e631b0408a36f23aa84c0e7 (patch) | |
tree | 6a2890728bf42084705e0100bec473570d1071a7 /ffmpeg_filter.c | |
parent | f3abdf4392a146462dc679846c061b8bf2b5c7a0 (diff) | |
download | ffmpeg-ad899522ffa7f0039e631b0408a36f23aa84c0e7.tar.gz |
ffmpeg: use a AVDictionary instead of the context to move swr parameters around
This avoids per parameter changes in ffmpeg at the cost of making access
somewhat more annoying.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r-- | ffmpeg_filter.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index a88e57c38c..7a9efeaf05 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -739,12 +739,10 @@ int configure_filtergraph(FilterGraph *fg) fg->graph->scale_sws_opts = av_strdup(args); args[0] = 0; - if (ost->swr_filter_type != SWR_FILTER_TYPE_KAISER) - av_strlcatf(args, sizeof(args), "filter_type=%d:", (int)ost->swr_filter_type); - if (ost->swr_dither_method) - av_strlcatf(args, sizeof(args), "dither_method=%d:", (int)ost->swr_dither_method); - if (ost->swr_dither_scale != 1.0) - av_strlcatf(args, sizeof(args), "dither_scale=%f:", ost->swr_dither_scale); + while ((e = av_dict_get(ost->swr_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; av_opt_set(fg->graph, "aresample_swr_opts", args, 0); |