Commit db79d041 authored by Stefano Sabatini's avatar Stefano Sabatini

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

That was pointless. Simplify.
parent b6c04b68
...@@ -268,10 +268,8 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment