mirror of https://git.tukaani.org/xz.git
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
|
@ -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 New Issue