avcodec: Make sure codec_type is set by avcodec_get_context_defaults2