avcodec/jpeg2000dec: Fix mixed declaration and code