Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-24 20:30:52 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-02-24 20:41:31 +0400
commit6db37c9468051ff34cac58fa428bc5d86fc1ee45 (patch)
treeac578a2ae106cb9a15f37769a87f5d4cf1dd3405 /ffmpeg_filter.c
parent71cf094e1be086bce4c535b1fe0d96a0449486ae (diff)
parent5c7db097ebe1fb5c233cedd8846615074e7d6044 (diff)
Merge commit '5c7db097ebe1fb5c233cedd8846615074e7d6044'
* commit '5c7db097ebe1fb5c233cedd8846615074e7d6044': avconv: pass libavresample options to AVFilterGraph Conflicts: cmdutils.c cmdutils.h ffmpeg_filter.c ffmpeg_opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r--ffmpeg_filter.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index ac3e719bd1..a88e57c38c 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -24,6 +24,8 @@
#include "libavfilter/avfiltergraph.h"
#include "libavfilter/buffersink.h"
+#include "libavresample/avresample.h"
+
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
@@ -730,7 +732,9 @@ int configure_filtergraph(FilterGraph *fg)
if (simple) {
OutputStream *ost = fg->outputs[0]->ost;
- char args[255];
+ char args[512];
+ AVDictionaryEntry *e = NULL;
+
snprintf(args, sizeof(args), "flags=0x%X", (unsigned)ost->sws_flags);
fg->graph->scale_sws_opts = av_strdup(args);
@@ -744,6 +748,15 @@ int configure_filtergraph(FilterGraph *fg)
if (strlen(args))
args[strlen(args)-1] = 0;
av_opt_set(fg->graph, "aresample_swr_opts", args, 0);
+
+ 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)