Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-06-23 14:03:00 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-06-23 17:08:23 +0400
commit6fd0b55ab2b3d42095f2eb40923609e10e8a53a5 (patch)
treef5ae7a65a00006e3c1e134b33bb7f5fa0c14f5d5 /libavfilter/avf_showwaves.c
parent6d627eae3cd5ff80382b76a67a596caf48869715 (diff)
showwaves: fix PTS computation.
Diffstat (limited to 'libavfilter/avf_showwaves.c')
-rw-r--r--libavfilter/avf_showwaves.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 90d3ec9441..121f785c15 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -202,7 +202,10 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
outlink->w, outlink->h);
outpicref->video->w = outlink->w;
outpicref->video->h = outlink->h;
- outpicref->pts = insamples->pts;
+ outpicref->pts = insamples->pts +
+ av_rescale_q((p - (int16_t *)insamples->data[0]) / nb_channels,
+ (AVRational){ 1, inlink->sample_rate },
+ outlink->time_base);
outlink->out_buf = outpicref;
linesize = outpicref->linesize[0];
memset(outpicref->data[0], 0, showwaves->h*linesize);