diff options
Diffstat (limited to 'libavfilter/audio.c')
-rw-r--r-- | libavfilter/audio.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c index 72e2ced..1489608 100644 --- a/libavfilter/audio.c +++ b/libavfilter/audio.c @@ -146,32 +146,12 @@ fail: return NULL; } -void ff_null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) +static void default_filter_samples(AVFilterLink *link, + AVFilterBufferRef *samplesref) { ff_filter_samples(link->dst->outputs[0], samplesref); } -/* FIXME: samplesref is same as link->cur_buf. Need to consider removing the redundant parameter. */ -void ff_default_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) -{ - AVFilterLink *outlink = NULL; - - if (inlink->dst->nb_outputs) - outlink = inlink->dst->outputs[0]; - - if (outlink) { - outlink->out_buf = ff_default_get_audio_buffer(inlink, AV_PERM_WRITE, - samplesref->audio->nb_samples); - outlink->out_buf->pts = samplesref->pts; - outlink->out_buf->audio->sample_rate = samplesref->audio->sample_rate; - ff_filter_samples(outlink, avfilter_ref_buffer(outlink->out_buf, ~0)); - avfilter_unref_buffer(outlink->out_buf); - outlink->out_buf = NULL; - } - avfilter_unref_buffer(samplesref); - inlink->cur_buf = NULL; -} - void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) { void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *); @@ -181,7 +161,7 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) FF_DPRINTF_START(NULL, filter_samples); ff_dlog_link(NULL, link, 1); if (!(filter_samples = dst->filter_samples)) - filter_samples = ff_default_filter_samples; + filter_samples = default_filter_samples; /* prepare to copy the samples if the buffer has insufficient permissions */ if ((dst->min_perms & samplesref->perms) != dst->min_perms || |