avcodec/jpeg2000dec: More completely check cdef