resample: avoid NULL deref

The function is NULL when the resampler was not initialized.

Fixes #1706
This commit is contained in:
Wim Taymans 2021-10-09 15:53:40 +02:00
parent 2c4b27163d
commit f6d69f9bcd

View file

@ -275,7 +275,8 @@ static void reset_node(struct impl *this)
outport = GET_OUT_PORT(this, 0); outport = GET_OUT_PORT(this, 0);
inport = GET_IN_PORT(this, 0); inport = GET_IN_PORT(this, 0);
resample_reset(&this->resample); if (this->resample.reset)
resample_reset(&this->resample);
outport->offset = 0; outport->offset = 0;
inport->offset = 0; inport->offset = 0;
} }