return 1;
} /* mod fixed_quality */
+
/* if no rate entered, lossless by default */
+ /* Note: post v2.2.0, this is no longer necessary, but for released */
+ /* versions at the time of writing, this is needed to avoid crashes */
if (parameters->tcp_numlayers == 0) {
- parameters->tcp_rates[0] = 0; /* MOD antonin : losslessbug */
+ parameters->tcp_rates[0] = 0;
parameters->tcp_numlayers++;
parameters->cp_disto_alloc = 1;
}
}
}
+ /* If no explicit layers are provided, use lossless settings */
+ if (parameters->tcp_numlayers == 0) {
+ parameters->tcp_numlayers = 1;
+ parameters->cp_disto_alloc = 1;
+ parameters->tcp_rates[0] = 0;
+ }
+
/* see if max_codestream_size does limit input rate */
if (parameters->max_cs_size <= 0) {
if (parameters->tcp_rates[parameters->tcp_numlayers - 1] > 0) {