Set AVCodecContext->codec upon initialization.