summaryrefslogtreecommitdiff
authorNicolas George <nicolas.george@normalesup.org>2013-04-11 12:58:08 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-04-12 10:11:10 (GMT)
commit62d888ef0e3be2bad044858d8c91fe103796967a (patch)
tree9ba93f652c4bdeb777d181213602241b12e5e02c
parente48ded8551172b58a78f30303a81dfce125344e0 (diff)
downloadffmpeg-62d888ef0e3be2bad044858d8c91fe103796967a.zip
ffmpeg-62d888ef0e3be2bad044858d8c91fe103796967a.tar.gz
ffmpeg-62d888ef0e3be2bad044858d8c91fe103796967a.tar.bz2
ffmpeg: use options for abuffersink.
Also remove unused buffersink_params. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--ffmpeg_filter.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 4d9e97d..63d8c54 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -285,13 +285,11 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
int pad_idx = out->pad_idx;
int ret;
char name[255];
- AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
ret = avfilter_graph_create_filter(&ofilter->filter,
avfilter_get_by_name("buffersink"),
name, NULL, NULL, fg->graph);
- av_freep(&buffersink_params);
if (ret < 0)
return ret;
@@ -368,18 +366,15 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
char *sample_fmts, *sample_rates, *channel_layouts;
char name[255];
int ret;
- AVABufferSinkParams *params = av_abuffersink_params_alloc();
- if (!params)
- return AVERROR(ENOMEM);
- params->all_channel_counts = 1;
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
ret = avfilter_graph_create_filter(&ofilter->filter,
avfilter_get_by_name("abuffersink"),
- name, NULL, params, fg->graph);
- av_freep(&params);
+ name, NULL, NULL, fg->graph);
if (ret < 0)
return ret;
+ if ((ret = av_opt_set_int(ofilter->filter, "all_channel_counts", 1, AV_OPT_SEARCH_CHILDREN)) < 0)
+ return ret;
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
AVFilterContext *filt_ctx; \