1
0
Fork 0
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:
Lasse Collin 2010-09-02 19:22:35 +03:00
parent b3ff7ba044
commit a848e47ced

View file

@ -67,6 +67,15 @@ extern void
coder_set_preset(size_t new_preset) coder_set_preset(size_t new_preset)
{ {
preset_number = 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; return;
} }