diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-31 01:22:29 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-05-09 22:29:53 +0400 |
commit | 7ef0adcc2e800cb1357d4d5d7ce878c0f9a36c01 (patch) | |
tree | 3919a6f8dfd07ea511af7b0142f291580881b252 /libavfilter/avfilter.c | |
parent | 6735534f19369a914d795aa84cd3faa4c57729ce (diff) |
lavfi: simplify signature for avfilter_get_audio_buffer() and friends
The additional parameters are just complicating the function interface.
Assume that a requested samples buffer will *always* have the format
specified in the requested link.
This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 9f81be7a8d..e301ddb37b 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -367,16 +367,15 @@ fail: } AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int nb_samples, - uint64_t channel_layout) + int nb_samples) { AVFilterBufferRef *ret = NULL; if (link->dstpad->get_audio_buffer) - ret = link->dstpad->get_audio_buffer(link, perms, sample_fmt, nb_samples, channel_layout); + ret = link->dstpad->get_audio_buffer(link, perms, nb_samples); if (!ret) - ret = avfilter_default_get_audio_buffer(link, perms, sample_fmt, nb_samples, channel_layout); + ret = avfilter_default_get_audio_buffer(link, perms, nb_samples); if (ret) ret->type = AVMEDIA_TYPE_AUDIO; @@ -593,9 +592,7 @@ void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) samplesref->perms, link->dstpad->min_perms, link->dstpad->rej_perms); link->cur_buf = avfilter_default_get_audio_buffer(link, dst->min_perms, - samplesref->format, - samplesref->audio->nb_samples, - samplesref->audio->channel_layout); + samplesref->audio->nb_samples); link->cur_buf->pts = samplesref->pts; link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate; |