mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/avf_showvolume: set time_base to outlink
And rescale timestamps.
This commit is contained in:
parent
d5687236ab
commit
9f73c40d32
@ -213,6 +213,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
|
||||
outlink->sample_aspect_ratio = (AVRational){1,1};
|
||||
outlink->frame_rate = s->frame_rate;
|
||||
outlink->time_base = av_inv_q(outlink->frame_rate);
|
||||
|
||||
for (ch = 0; ch < inlink->ch_layout.nb_channels; ch++) {
|
||||
int i;
|
||||
@ -338,7 +339,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
||||
}
|
||||
clear_picture(s, outlink);
|
||||
}
|
||||
s->out->pts = insamples->pts;
|
||||
s->out->pts = av_rescale_q(insamples->pts, inlink->time_base, outlink->time_base);
|
||||
|
||||
if ((s->f < 1.) && (s->f > 0.)) {
|
||||
for (j = 0; j < outlink->h; j++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user