> + if (j2k_ncomponents != component_count) {
> + av_log(s, AV_LOG_ERROR, "Incoherence about components image
> number.\n");
> + }
I still think you should error out here, since mismatched component
count is indicative of broken internal logic
/Tomas