mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
xz: Make setting a preset override a custom filter chain.
This is more logical behavior than ignoring preset level options once a custom filter chain has been specified.
This commit is contained in:
parent
b3ff7ba044
commit
a848e47ced
1 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,15 @@ extern void
|
|||
coder_set_preset(size_t new_preset)
|
||||
{
|
||||
preset_number = new_preset;
|
||||
|
||||
// Setting a preset makes us forget a possibly defined custom
|
||||
// filter chain.
|
||||
while (filters_count > 0) {
|
||||
--filters_count;
|
||||
free(filters[filters_count].options);
|
||||
filters[filters_count].options = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue