aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorAndrew Wason <rectalogic@rectalogic.com>2012-06-04 14:07:15 -0400
committerMichael Niedermayer <michaelni@gmx.at>2012-06-05 03:02:41 +0200
commit1ef802d0385dda533fb22702ed21de4e9a810658 (patch)
tree969461f9ff1f154386a5b221fb437fdbdf1a5080 /doc/examples
parent13a7bd70c8d94c5a46c14e7ac23a170b77eff52e (diff)
downloadffmpeg-1ef802d0385dda533fb22702ed21de4e9a810658.tar.gz
update filtering_audio example
The filtering_audio.c example needs to be updated for the new "abuffer" filter args. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/Makefile1
-rw-r--r--doc/examples/filtering_audio.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index a3d135d60b..5217d6e56a 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
@@ -3,7 +3,6 @@ FFMPEG_LIBS= libavdevice \
libavformat \
libavfilter \
libavcodec \
- libavresample \
libswresample \
libswscale \
libavutil \
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index dda55964fc..c934327239 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -91,14 +91,17 @@ static int init_filters(const char *filters_descr)
const int64_t *chlayouts = avfilter_all_channel_layouts;
AVABufferSinkParams *abuffersink_params;
const AVFilterLink *outlink;
+ AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base;
filter_graph = avfilter_graph_alloc();
/* buffer audio source: the decoded frames from the decoder will be inserted here. */
if (!dec_ctx->channel_layout)
dec_ctx->channel_layout = av_get_default_channel_layout(dec_ctx->channels);
- snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64,
- dec_ctx->sample_rate, dec_ctx->sample_fmt, dec_ctx->channel_layout);
+ snprintf(args, sizeof(args),
+ "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64,
+ time_base.num, time_base.den, dec_ctx->sample_rate,
+ av_get_sample_fmt_name(dec_ctx->sample_fmt), dec_ctx->channel_layout);
ret = avfilter_graph_create_filter(&buffersrc_ctx, abuffersrc, "in",
args, NULL, filter_graph);
if (ret < 0) {