set encoder-context in packet struct