diff options
author | Robert Nagy <ronag89@gmail.com> | 2012-04-16 01:08:00 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-04-16 01:08:00 +0200 |
commit | ed66bbfcb95f52470d32c363a02d5ee4bf940c1c (patch) | |
tree | d5900cf5baa9fe30cd6d01036e21fce8d3434241 /libavfilter | |
parent | 4d84c7ded67141cdadaf052df01d9bd8940119ad (diff) | |
download | ffmpeg-ed66bbfcb95f52470d32c363a02d5ee4bf940c1c.tar.gz |
lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aresample.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index cde9adf254..786fb8565b 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -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); |