AVFilterContext *ctx = inlink->dst;
SilenceRemoveContext *s = ctx->priv;
+ s->next_pts = AV_NOPTS_VALUE;
s->window_size = FFMAX((inlink->sample_rate * s->window_ratio), 1) * inlink->channels;
s->window = av_malloc_array(s->window_size, sizeof(*s->window));
if (!s->window)
nb_samples_read = nb_samples_written = 0;
+ if (s->next_pts == AV_NOPTS_VALUE)
+ s->next_pts = in->pts;
+
switch (s->mode) {
case SILENCE_TRIM:
silence_trim:
{ NULL }
};
-AVFilter ff_af_silenceremove = {
+const AVFilter ff_af_silenceremove = {
.name = "silenceremove",
.description = NULL_IF_CONFIG_SMALL("Remove silence."),
.priv_size = sizeof(SilenceRemoveContext),