1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
This commit is contained in:
Robert Nagy 2012-04-16 01:08:00 +02:00 committed by Stefano Sabatini
parent 4d84c7ded6
commit ed66bbfcb9

View File

@ -100,8 +100,8 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
outsamplesref->audio->sample_rate = outlink->sample_rate;
outsamplesref->audio->nb_samples = n_out;
outsamplesref->pts = av_rescale(outlink->sample_rate, insamplesref->pts,
inlink ->sample_rate);
outsamplesref->pts = insamplesref->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
av_rescale(outlink->sample_rate, insamplesref->pts, inlink ->sample_rate);
avfilter_filter_samples(outlink, outsamplesref);
avfilter_unref_buffer(insamplesref);