fix init in codec/decoder constructor