avcodec: move some AVCodecContext fields to an internal struct.