mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
resample: only free resampler when implemented
This commit is contained in:
parent
fd82f38ff4
commit
74c71e9bad
1 changed files with 4 additions and 2 deletions
|
|
@ -138,6 +138,7 @@ static int setup_convert(struct impl *this,
|
||||||
if (src_info->info.raw.channels != dst_info->info.raw.channels)
|
if (src_info->info.raw.channels != dst_info->info.raw.channels)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (this->resample.free)
|
||||||
resample_free(&this->resample);
|
resample_free(&this->resample);
|
||||||
|
|
||||||
this->resample.channels = src_info->info.raw.channels;
|
this->resample.channels = src_info->info.raw.channels;
|
||||||
|
|
@ -891,6 +892,7 @@ static int impl_clear(struct spa_handle *handle)
|
||||||
|
|
||||||
this = (struct impl *) handle;
|
this = (struct impl *) handle;
|
||||||
|
|
||||||
|
if (this->resample.free)
|
||||||
resample_free(&this->resample);
|
resample_free(&this->resample);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue