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:
authorNicolas George <nicolas.george@normalesup.org>2012-04-28 17:03:08 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-05-05 01:26:41 +0400
commit9f357e2bcdea20d16c7771eff183414e375d0c7a (patch)
treedc8095e0b1287dc5f7e0dc3bc330c19d9e6554aa /doc/examples/filtering_audio.c
parent7bac2a78c2241df4bcc1665703bb71afd9a3e692 (diff)
examples/filtering_audio: use av_buffersrc_add_frame.
Diffstat (limited to 'doc/examples/filtering_audio.c')
-rw-r--r--doc/examples/filtering_audio.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 45d5c64847..5fa3f9b56a 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -203,17 +203,8 @@ int main(int argc, char **argv)
}
if (got_frame) {
- const int bps = av_get_bytes_per_sample(dec_ctx->sample_fmt);
- const int decoded_data_size = frame.nb_samples * dec_ctx->channels * bps;
-
/* push the audio data from decoded frame into the filtergraph */
- if (av_asrc_buffer_add_buffer(buffersrc_ctx,
- frame.data[0],
- decoded_data_size,
- dec_ctx->sample_rate,
- dec_ctx->sample_fmt,
- dec_ctx->channel_layout,
- 0, frame.pts, 0) < 0) {
+ if (av_buffersrc_add_frame(buffersrc_ctx, &frame, 0) < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
break;
}