av_frame_copy_props(out, in);
}
+ if (s->pts == AV_NOPTS_VALUE)
+ s->pts = in->pts;
+
out->pts = s->pts;
src = (const double *)in->data[0];
dst = (double *)out->data[0];
true_peak = tmp;
}
- offset = s->target_i - global;
- offset_tp = true_peak + offset;
+ offset = pow(10., (s->target_i - global) / 20.);
+ offset_tp = true_peak * offset;
s->offset = offset_tp < s->target_tp ? offset : s->target_tp - true_peak;
- s->offset = pow(10., s->offset / 20.);
s->frame_type = LINEAR_MODE;
}
formats = ff_make_format_list(input_srate);
if (!formats)
return AVERROR(ENOMEM);
- ret = ff_formats_ref(formats, &inlink->out_samplerates);
+ ret = ff_formats_ref(formats, &inlink->outcfg.samplerates);
if (ret < 0)
return ret;
- ret = ff_formats_ref(formats, &outlink->in_samplerates);
+ ret = ff_formats_ref(formats, &outlink->incfg.samplerates);
if (ret < 0)
return ret;
}
inlink->partial_buf_size = frame_size(inlink->sample_rate, 3000);
}
- s->pts =
+ s->pts = AV_NOPTS_VALUE;
s->buf_index =
s->prev_buf_index =
s->limiter_buf_index = 0;