af_aresample: do not request a buffer with AV_PERM_REUSE2 permissions in filter_samples()

That was pointless. Simplify.
This commit is contained in:
Stefano Sabatini 2011-09-17 01:18:53 +02:00
parent b6c04b6821
commit db79d04173

View File

@ -268,10 +268,8 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
if (aresample->outsamplesref) if (aresample->outsamplesref)
avfilter_unref_buffer(aresample->outsamplesref); avfilter_unref_buffer(aresample->outsamplesref);
aresample->outsamplesref = avfilter_get_audio_buffer(outlink, aresample->outsamplesref =
AV_PERM_WRITE | AV_PERM_REUSE2, avfilter_get_audio_buffer(outlink, AV_PERM_WRITE, requested_out_nb_samples);
requested_out_nb_samples);
avfilter_copy_buffer_ref_props(aresample->outsamplesref, insamplesref); avfilter_copy_buffer_ref_props(aresample->outsamplesref, insamplesref);
aresample->outsamplesref->pts = aresample->outsamplesref->pts =
insamplesref->pts / inlink->sample_rate * outlink->sample_rate; insamplesref->pts / inlink->sample_rate * outlink->sample_rate;