[FFmpeg-cvslog] lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Robert Nagy
git at videolan.org
Mon Apr 16 01:17:42 CEST 2012
ffmpeg | branch: master | Robert Nagy <ronag89 at gmail.com> | Mon Apr 16 01:08:00 2012 +0200| [ed66bbfcb95f52470d32c363a02d5ee4bf940c1c] | committer: Stefano Sabatini
lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Signed-off-by: Stefano Sabatini <stefasab at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed66bbfcb95f52470d32c363a02d5ee4bf940c1c
---
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 cde9adf..786fb85 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);
More information about the ffmpeg-cvslog
mailing list