lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
This commit is contained in:
parent
4d84c7ded6
commit
ed66bbfcb9
@ -100,8 +100,8 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
|
|||||||
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
||||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||||
outsamplesref->audio->nb_samples = n_out;
|
outsamplesref->audio->nb_samples = n_out;
|
||||||
outsamplesref->pts = av_rescale(outlink->sample_rate, insamplesref->pts,
|
outsamplesref->pts = insamplesref->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
|
||||||
inlink ->sample_rate);
|
av_rescale(outlink->sample_rate, insamplesref->pts, inlink ->sample_rate);
|
||||||
|
|
||||||
avfilter_filter_samples(outlink, outsamplesref);
|
avfilter_filter_samples(outlink, outsamplesref);
|
||||||
avfilter_unref_buffer(insamplesref);
|
avfilter_unref_buffer(insamplesref);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user