mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -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,7 +138,8 @@ static int setup_convert(struct impl *this,
|
|||
if (src_info->info.raw.channels != dst_info->info.raw.channels)
|
||||
return -EINVAL;
|
||||
|
||||
resample_free(&this->resample);
|
||||
if (this->resample.free)
|
||||
resample_free(&this->resample);
|
||||
|
||||
this->resample.channels = src_info->info.raw.channels;
|
||||
this->resample.i_rate = src_info->info.raw.rate;
|
||||
|
|
@ -891,7 +892,8 @@ static int impl_clear(struct spa_handle *handle)
|
|||
|
||||
this = (struct impl *) handle;
|
||||
|
||||
resample_free(&this->resample);
|
||||
if (this->resample.free)
|
||||
resample_free(&this->resample);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue